These are a list of usages of shell commands I can't live without on UNIX-based systems.
Using Homebrew (yes, I am opinionated) you can install the following tools with the following packages:
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
var request = require('request'); | |
var settings = { | |
AKAMAI_USER: 'test', | |
AKAMAI_PASSWORD: '...', | |
AKAMAI_NOTIFICATION_EMAIL: '' | |
}; | |
var akamai = exports; | |
var SOAP_URL = 'https://ccuapi.akamai.com:443/soap/servlet/soap/purge'; |
This is the most basic example of vertical scaling by transferring connections to workers, rather than sharing server sockets. It was presented at JSConf US 2012. With this you can create some interesting balancing algorithms that cluster would defer to internal/OS logic.
A good first project when working with this is to implement sticky sessions based upon connection.remoteAddress and/or connection.remotePort.
A good advanced project is to change from a TCP based balancer to a HTTP(S) one and balance based upon not just connection.remoteAddress etc. but also on the protocol and/or Host header.
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference. | |
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2 | |
# Step 0: Check what is going on at port 80 | |
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
# Step 1: Increase the number of available fds | |
$ ulimit -n 32000 | |
# Step 2: Restart your webserver, for me: |
This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
bundle install
mate Guardfile
bundle exec jasmine init
mate spec/support/yasmine.ym
bundle exec guard
Apple Developer | |
Technologies | |
Resources | |
Programs | |
Support | |
Member Center | |
Search Developer |