Code or Die Welcome to my kitchen

Yak shaving tips, Infosec, Astronomy, Gardening

This is my blog. Proud guardian of a square number of cats and one (1) dog, 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

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 -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 '' 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


Ended up simply installing 64 bit deb package from site.

How To Install Dropbox

Add Dropbox’s repository key sudo apt-key adv --keyserver --recv-keys 5044912E

Add Dropbox’s repository sudo add-apt-repository "deb $(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 --recv-keys 5044912E

Add repository sudo add-apt-repository "deb 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 = £
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 - “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.


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.

The Best Advice for Computer Science Students

So I’ve been back in academia for a while, (feeling like Rodney Dangerfield,) and I have noticed at least one super important aspect of writing code that seems to be overlooked by my classmates.

Spoiler: Use Git For All The Things

The missing ingredient is a version control system and since it is 2018 I mean Git. Git is used in the real-world, (“in the wild” as my old instructors would say,) and has become the version control system de rigueur. This means if you are a computer science student1 then you should definitely learn how to use it, and not just for the software engineering project management courses.

Git makes a kind of “save point” in my assignments and projects to which I can always fall back to the last known good configuration of a given program. This liberates me to go ahead and spike out with crazy ideas and randomness that may or may not yield a favorable result.

I use Git for homework, Git for solo projects, and Git for group projects. Admittedly this last one has a higher bar since it requires all group members to use git, however as a true believer you should have no trouble convincing them of its usefulness. If not, then you can still use Git personally and benefit from it, but you would be missing out on the whole point of version control with distributed teams.

Git along lil’ doggies

Luckily there are loads of resources to learn Git.

  1. Even if you’re not in the field of computer science, you may still reap the ample benefits of using Git. Any creative working collaboratively (or solo) can benefit from version control, but in practice most will simply use Dropbox or MS Office to handle multiple versions of the same document edited by different authors.