Enable forwarding:
sysctl -w net.ipv4.ip_forward=1
Create this script eg sudo nano iptables.sh
eth=$1
proto=$2
Enable forwarding:
sysctl -w net.ipv4.ip_forward=1
Create this script eg sudo nano iptables.sh
eth=$1
proto=$2
#!/bin/sh | |
/usr/bin/open -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app |
## An alternate guide: https://gorails.com/deploy/ubuntu/14.04 | |
So, you've built a cool Rails-based application, now you want to share it with others. You can go the Heroku route, they | |
have a free tier, its quick and painless, no mucking around in configuration files, just `git push` and you're done. But, what happens when you need more control? What happens when you build an application that uses a lot of functionality that only comes from paid add-ons on Heroku, but for a site that makes little-to-no revenue? In those situations, you can use a Virtual Private Server, or VPS for short. | |
#Why VPS? | |
VPS's are cheap, are relatively easy to setup (with some Linux know-how), and are much easier than having to deal directly with physical server hardware. | |
# Sign up for DigitalOcean | |
* Go here: https://www.digitalocean.com/ |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Look at the following image...
...it shows an object being tested.
You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |
"A blatant workman ripoff of bmx 007's beautiful colemak version called 'colqer' http://www.vim.org/scripts/script.php?script_id=2865 It makes vim so that you can insert and Ex mode in the workman keyboard layout, but can do the rest in qwerty. | |
"usage: put it in ~/.vim/plugin/ as workman.vim | |
"press \; in normal mode to activate/deactivate it. | |
"Keyboard is qwerty | |
" we want workman in insert mode | |
function IMapColemak() | |
if s:imap_colemak == 0 | |
noremap! q q | |
noremap! w d |