Code or Die Welcome to my kitchen

Yak shaving tips, Infosec, Astronomy, Gardening

This is my blog. Proud guardian of three cats and two dogs, I currently reside in San Antonio, Texas.

I'm interested in gardening, astronomy, infosec among other pursuits. About this site.

Past and current projects.. You can also browse the blog archive if you like.

Message of the Day: Under construction

My favorite Mac "hacks"

My fave OS H4X for Mac.

1 Install homebrew

Install trash & other tools

2 Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window

$ login window sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName

3 DND all the time

Set the time for Do Not Disturb in Preferences, Turn on from 7:00 AM to 6:59 AM for example.

4 Change background problematically

Use IFTT recipe to download the latest top landscape pictures from a prominent Internet forum on photography. Use Automator to watch folder on Dropbox and set a new Desktop background.

Running Linux on Chromebook using Crouton

Long before it became an actually built in option as it is now, it was only possible to retrofit a full scale Ubuntu installation on Chromebooks. These are my notes on installation gotchas for a complete developer environment on Ubuntu, including Zsh, Oh My Zsh, and Dropbox - all running via chroot Chromium OS. There are now better ways of accomplishing the same thing, but back then (just a few months ago) it was the only reliable way.

Crouton is a sorta acronym for open source project Chromium OS Universal Chroot Environment.

crouton is a set of scripts that bundle up into an easy-to-use, Chromium OS-centric chroot generator.

Crouton has a major shortcoming for security minded users, and as such, (in my view and the view of crouton devs themselves,) folks would do well to take advantage of new improved security features in Chromium OS.

The devs recommend Crostini:

Crostini is an official project within Chromium OS to bring the Linux shell and apps to the platform in verified mode with clean integration, multi-layered security, and all the polish you expect from Chromium OS proper.

That said, pressing on:

Install Crouton

via crosh after turning on Chromebook’s Developer Mode.

  • Update a chroot: sudo sh ~/Downloads/crouton -u -n xenial

  • Mount a chroot and enter the ‘shell’: sudo enter-chroot

  • Start Xfce via the startxfce4 host command: sudo startxfce4

Linuxbook Mods

  1. Install Sublime Text 3 - sudo apt-get install sublime

  2. Install git - sudo apt-get install git-all

  3. Install rbenv - wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash add rbenv to PATH $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc rbenv init add to .bashrc: eval "$(rbenv init -)" finally rbenv rehash`

  4. locale issues launching Sublime Text “On Linux, please reference your distribution’s docs for information on properly setting the LANG and LC_CTYPE environmental variables. As a temporary work-around, you can launch Sublime Text from the Terminal with q:LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 sublime_text” locale issue - Set up a clean UTF8 environment Solution: This generally means you haven’t properly set up locales on your Linux box. sudo locale-gen en_US en_US.UTF-8 sudo locale-gen by itself did not work- would result in fail in next command sudo dpkg-reconfigure locales (See also man locale-gen.)

  5. ruby - using rbenv - installing 2.5.1 set as global rbenv global 2.5.1 rbenv rehash - Rehash rbenv shims (run this after installing executables) ERROR: Ruby install aborted due to missing extensions - Try running apt-get install -y libssl-dev libreadline-dev zlib1g-dev to fetch missing dependencies. Colors in terminal DID NOT DO - in favor of just cloning repos

  6. Installing Dropbox getting Permissions Error node - npm, Install Node Js Linux sass bundle install on jekyll blog directory

  7. An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue. Make sure that gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/' succeeds before bundling. SOLUTION: Prepending bundle exec to your command may solve this.

  8. Installed GCC, restarted, and was able to both bundle install and bundle exec jekyll serve

  9. Installing ZSH via apt-get, making default shell Zsh

  10. Install Zsh Shell Ubuntu 1804

  11. then install oh-my-zsh

  12. Set Locale export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8

Dropbox

Ended up simply installing 64 bit deb package from site.

How To Install Dropbox

Add Dropbox’s repository key sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E

Add Dropbox’s repository sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu $(lsb_release -sc) main"`

Update and install Dropbox sudo apt-get update && sudo apt-get install nautilus-dropbox

For Ubuntu 12.10:

Add repository key sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E

Add repository sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu precise main"

Update your system and install Dropbox

sudo apt-get update && sudo apt-get install dropbox When prompted click Next, then click Start Dropbox to continue.

Zsh + Oh My Zsh

Installing Zsh

chsh -s $(which zsh)

echo $0 to test which shell currently running

Can’t Make Zsh The Default Shell

Solve empty nvmrc file nvm issues 1113

RIGHT ALT keys (AltGr) on EXTD keyboard

For Deutsch keyboard.

Commonly used:

ALT + q = ä (+ SHIFT Ä)
ALT + p = ö (+ SHIFT Ö)
ALT + y = ü (+ SHIFT Ü)
ALT + s = ß 
ALT + SHIFT + U + 1E9E = ẞ (capital ß)
ALT + z = æ (+ SHIFT Æ)
ALT + 5 = € 
ALT + SHIFT + c = ¢
ALT + SHIFT + 5 = £
Misc:
ALT + r = ë (+ SHIFT Ë)  
ALT + j = ï (+ SHIFT Ï)
ALT + n = ñ (+ SHIFT Ñ)
ALT + w = å (+ SHIFT Å) 

Static Site Generators Galore

Remember I posted about a few choice static site generators (SSG), built on the deliciously named JAM stack? Well, you’re in for a treat… just recently on website of repute Hacker News, (which I consume more often than not via the always informative Hacker Newsletter,) I found out about an awesome page that ranks all the open-source SSGs on GitHub, and another one that is a huge spreadsheet of hundreds of them!

Seriously hundreds of them

StaticSiteGenerators.net - “The definitive listing of Static Site Generators — all 458 of them!” The most powerful feature here is the sorting projects by date created/updated. Listing by language is nice too.

StaticGen

The webapp StaticGen ranks all the open-source SSGs on GitHub filtered by Stars, Forks, Issues. Pretty darn neat.

The field of SSGs really has come a long way and we are certainly spoiled for choice when it comes to serving up what the Web does best, which is deliver streams of plain text to the face as quickly as possible.