I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
If you encounter errors like this ``fatal error: 'stdlib.h' file not foundon Yosemite and Xcode 6.0.1, your
/usr/include/` is probably missing.
Try this command on Terminal:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /usr/include
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
#!/bin/bash | |
# | |
# git-subdir.sh | |
# | |
git clone --no-hardlinks $1 $2 | |
cd $2 | |
git filter-branch --subdirectory-filter $2 --prune-empty --tag-name-filter cat HEAD -- --all |
#!/bin/bash | |
# | |
# git-rmsubdir.sh | |
# | |
cd $1 | |
git filter-branch --index-filter "git rm -r -f --cached --ignore-unmatch $2" --prune-empty HEAD |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>F19 to F19</name> | |
<appendix>(F19 to Hyper (ctrl+cmd+opt) + F19 Only, F19)</appendix> | |
<identifier>private.f192f19</identifier> | |
<autogen> | |
--KeyOverlaidModifier-- | |
KeyCode::F19, | |
KeyCode::COMMAND_L, |
#!/bin/bash | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |