apt-get update
apt-get upgrade
apt-get install build-essential
#!/usr/bin/env python | |
import sys | |
class Lexer: | |
NUM, ID, IF, ELSE, WHILE, DO, LBRA, RBRA, LPAR, RPAR, PLUS, MINUS, LESS, \ | |
EQUAL, SEMICOLON, EOF = range(16) | |
SYMBOLS = { '{': LBRA, '}': RBRA, '=': EQUAL, ';': SEMICOLON, '(': LPAR, |
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
#!/bin/bash | |
# | |
# chkconfig: 235 10 90 | |
# description: TeamCity startup script | |
# | |
TEAMCITY_USER=teamcity | |
TEAMCITY_DIR=/home/teamcity/TeamCity/ | |
TEAMCITY_SERVER=bin/teamcity-server.sh |
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
Example /etc/nginx/nginx.conf
using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.
Will need to create a directory to hold cache files, for the example given here that would be:
$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
#!/usr/bin/env bash | |
source super.bash | |
foo() { | |
echo hello | |
} | |
super_function foo | |
foo() { |
#!/usr/bin/env bash | |
# | |
# Wraps curl with a custom-drawn progress bar. Use it just like curl: | |
# | |
# $ curl-progress -O http://example.com/file.tar.gz | |
# $ curl-progress http://example.com/file.tar.gz > file.tar.gz | |
# | |
# All arguments to the program are passed directly to curl. Define your | |
# custom progress bar in the `print_progress` function. | |
# |