ab -n 100000 -c 100 -k http://127.0.0.1:1337/
Server Software:
Server Hostname: 127.0.0.1
Server Port: 1337
Document Path: /
This file contains hidden or 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 gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var minifycss = require('gulp-minify-css'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var phpunit = require('gulp-phpunit'); | |
var notify = require('gulp-notify'); | |
var gutil = require('gulp-util'); | |
var exec = require('child_process').exec; | |
var sys = require('sys'); | |
var livereload = require('gulp-livereload'); |
This file contains hidden or 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
from collections import defaultdict | |
def toposort(graph): | |
"""http://code.activestate.com/recipes/578272-topological-sort/ | |
Dependencies are expressed as a dictionary whose keys are items | |
and whose values are a set of dependent items. Output is a list of | |
sets in topological order. The first set consists of items with no | |
dependences, each subsequent set consists of items that depend upon | |
items in the preceeding sets. |
This file contains hidden or 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/bash | |
set -e | |
# Usage: | |
# rsync_parallel.sh [--parallel=N] [rsync args...] | |
# | |
# Options: | |
# --parallel=N Use N parallel processes for transfer. Defaults to 10. | |
# | |
# Notes: |
Many mobile apps have back-end API servers. They usually rely on the API replies to determine whether certain information is supposed to be shown. If the API responses could be manipulated on the fly, we may easily fool an unmodified app to expose some private data.
This manual guides you to set up nginx as non-transparent SSL proxy, which just subsitutes strings in the server responses (i.e. man-in-the-middle attack ourself). For both server-side (their API servers) and client-side (your device), the whole process is almost transparent.
This file contains hidden or 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
Byobu Commands | |
============== | |
byobu Screen manager | |
Level 0 Commands (Quick Start) | |
------------------------------ | |
<F2> Create a new window |
This file contains hidden or 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
" HJKL repetition trap | |
" Barry Arthur, 2013-03-14 | |
" depends on your :help 'updatetime setting | |
let g:cursor_moving = 0 | |
function! TrapMovementKeys(key) | |
augroup CursorMoving | |
au! | |
autocmd CursorMoved * let g:cursor_moving = 1 |
This file contains hidden or 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
function mux { | |
case "$1" in | |
"") | |
# If no args, list all the available "visible" sessions. | |
tmux ls | grep --color=never -C0 "^[^.]" | |
;; | |
*) | |
# "Hidden" sessions have a name starting with a '.'. | |
session_id=".$1.`date +%Y%m%d%H%M%S`" | |
# Try to create a hidden session and attach it to the specified one, killing it once finished. |
This file contains hidden or 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
" HJKL repetition trap | |
" Barry Arthur, 2013-03-14 | |
" depends on your :help 'updatetime setting | |
let g:cursor_moving = 0 | |
function! TrapMovementKeys(key) | |
augroup CursorMoving | |
au! | |
autocmd CursorMoved * let g:cursor_moving = 1 |
This file contains hidden or 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 | |
$required = array('hostname', 'username', 'password', 'database', 'driver'); | |
$config = array( | |
'password' => 'pass', | |
'database' => 'mydb', | |
'charset' => 'utf8', | |
'port' => '1234' | |
); | |
$errors = array_diff($required, array_flip($config)); |