Skip to content

Instantly share code, notes, and snippets.

View ekiara's full-sized avatar
🎯
Focusing

Eric Kiara ekiara

🎯
Focusing
View GitHub Profile
# list
vatfit (fit prices/quotations to get whole numbers both for cost and cost + 1.16)
@ekiara
ekiara / setup_node_on_ubuntu
Last active December 23, 2015 06:19
Setup node on Ubuntu
# Setup node on Ubuntu
sudo apt-get update
# Make sure that these packages are already installed
# - python-software-properties
# - python
# - g++
# - make
@ekiara
ekiara / for_kennedy_this_is_how_you_do_it.txt
Created September 18, 2013 18:44
for_kennedy_this_is_how_you_do_it.txt
# Do this to compile your multiple js scripts into one file
cat thisfile.js theother.js andthisone.js | uglify-js -o script.min.js
# Or if you've setup bash/zsh aliases like I showed you then do something like this:
cat thisfile.js theother.js andthisone.js | ugly -o script.min.js
npm -g install phantomjs ----> This is not possible: PhantomJS is not packaged as a nodejs module
????npm -g install casperjs???? ----> Do I really need this? The original plan was actually splinter + phantom + selenium
????npm -g install slimerjs???? ----> This is not worth it: SlimerJS is not yet headless (it depends on X or xvfb)
pip install selenium
@ekiara
ekiara / gist:6634562
Created September 20, 2013 08:01
Do this with your Openbox
# Do this with your Openbox
http://urukrama.wordpress.com/2011/10/30/manual-tiling-in-openbox/
http://openbox.org/wiki/Help:Actions#MoveResizeTo
http://ubuntuforums.org/showpost.php?p=10515916&postcount=18
http://urukrama.wordpress.com/2008/07/22/my-openbox-keybindings/
# Convert vanilla Ubuntu to xubuntu
https://sites.google.com/site/easylinuxtipsproject/alternative
https://sites.google.com/site/easylinuxtipsproject/speed
# DL (pilfer) all files from archive.org (#dafuq)
https://github.com/levle/pilfer-archive
https://github.com/levle/pilfer-archive/blob/master/archive.py
# Blanking root's password
# TODO
# Mounting an encrypted LVM password on another machine
# TODO
# http://ubuntuforums.org/showthread.php?t=940904
sudo apt-get install cryptsetup # Installs the tools we need to deal with encrypted partitions
sudo modprobe dm-crypt # Inserts a module we need
sudo cryptsetup luksOpen /dev/sda2 cheer # Unlocks the partition sda2 and names it cheer
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.
# Step 0 for any project should always be "SETTING UP AUTOMATIC DEPLOYMENT"
# TODO (article)
- Always do this first, it'll always make your life easier when the project is winding up
- But how do I do this when I'm pushing stuff to a shared host on el-cheapo host?
- Paramiko and other tools I like using
- How to protect your self / Don't shoot yourself in the foot / Avoiding rsyncing a blank directory to your formerly complete project / etc