This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH" | |
export PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); // Store net module in net variable | |
var server = net.createServer(function (socket) { // create a netserver using createServer() function. | |
socket.write('Information \r\n'); // Write information of the client. | |
socket.pipe(socket); // connect to socket | |
}); | |
server.listen(1337, '127.0.0.1'); // port and host running on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
print_r(PDO::getAvailableDrivers()); // This will display an array that lists PDO drivers avilable on the web server. | |
?> | |
/* | |
Example. | |
Web Setup: WAMP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo PHP_VERSION; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TERM=xterm-256color # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sinatra/base" | |
class App < Sinatra::Base | |
get "/" do | |
"Hello World!" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorscheme molokai | |
let g:neocomplcache_disable_auto_complete = 1 | |
set nospell | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<TAB>" : "\<C-x>\<C-u>" | |
function! s:check_back_space()"{{{ | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~ '\s' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:let srv1_id = jobstart('netcat-server-1', 'nc', ['-l', '9991']) | |
:let srv2_id = jobstart('netcat-server-2', 'nc', ['-l', '9991']) | |
function JobEvent() | |
" v:job_data[0] = the job id | |
" v:job_data[1] = the event type, one of "stdout", "stderr" or "exit" | |
" v:job_data[2] = data read from stdout or stderr | |
if v:job_data[1] == 'stdout' | |
let str = 'Message from job '.v:job_data[0].': '.v:job_data[2] | |
elseif v:job_data[1] == 'stderr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is an example of Facebook's HackLang. | |
*/ | |
<?hh # Hack uses 'hh' insted of 'php' | |
echo "Hello World! |
OlderNewer