I hereby claim:
- I am jamesrwhite on github.
- I am jamesrwhite (https://keybase.io/jamesrwhite) on keybase.
- I have a public key ASBFULLdB5fpfNm4Z0wnJlwHyT2rbNIYMuAXvsxh3ZfCLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| echo "TODO.." |
I hereby claim:
To claim this, I am signing this object:
| require 'faye' | |
| require 'eventmachine' | |
| EM.run do | |
| client = Faye::Client.new('http://localhost:9292/faye', { timeout: 10 }) | |
| pub = client.publish('/test', 'yo') | |
| pub.callback do | |
| puts "message recieved" |
| # Database configs, only one of those will be chosen based on the env | |
| database_configs = { | |
| 'development': { | |
| 'ENGINE': 'django.db.backends.mysql', | |
| 'NAME': 'wina', | |
| 'USER': 'django', | |
| 'PASSWORD': 'password', | |
| 'HOST': '127.0.0.1', | |
| 'PORT': '3306', | |
| }, |
| <?php | |
| class view_abstract { | |
| protected $_data = array(); | |
| public function __get($name) { | |
| echo "Getting $name\n"; | |
| // Dependencies | |
| var http = require('http'); | |
| express = require('express'), | |
| path = require('path'), | |
| db = require('riak-js').getClient({ debug: true }), | |
| app = express(); | |
| // All environments | |
| app.set('port', process.env.PORT || 3000); | |
| app.use(express.logger('dev')); |
| function addhost { | |
| colour1="\e[34m" # Blue | |
| colour2="\e[31m" # Red | |
| sudo sh -c "echo '$2\t$1' >> /etc/hosts" # Append to the hosts file | |
| dscacheutil -flushcache # Flush DNS | |
| echo "\e[0mPointed $colour1$1 \e[0mto $colour2$2\e[0m" | |
| } |
| <?php | |
| $curl = curl_init('http://123123123123123123123123213w.com'); | |
| curl_setopt_array($curl, array( | |
| CURLOPT_HEADER => true, | |
| CURLOPT_NOBODY => true, | |
| CURLOPT_RETURNTRANSFER => true, | |
| )); |
| function nginx() { | |
| if test $# = 0 || test $1 = "start" | |
| then | |
| sudo nginx && echo "Success!" | |
| # stop or reload | |
| else |