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
set :application, "application name" | |
set :repository, "[email protected]:olekenneth/repo.git" | |
set :deploy_to, "/var/www/#{application}" | |
set :log_to, "/var/log/node" | |
set :use_sudo, false | |
set :public_children, %w{} | |
role :web, "do" |
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
/** | |
* Get Google Page Speed Screenshot | |
* | |
* Uses Google's Page Speed API to generate a screenshot of a website. | |
* Returns the image as a base64 jpeg image tag | |
* | |
* Usage Example: | |
* echo getGooglePageSpeedScreenshot("http://ghost.org", 'class="thumbnail"'); | |
* | |
* |
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
#!/usr/bin/env bash | |
# Install missing Linux From Scratch Host System Requirements for Ubuntu 14.04 | |
if [ ! $(whoami) == "root" ]; then | |
echo "Please run as root!" | |
exit 1 | |
fi | |
# symlink sh to bash | |
ln -fsv /bin/bash /bin/sh |
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
require 'benchmark/ips' | |
require 'open-uri' | |
require 'cgi' | |
require 'erb' | |
require 'rack' | |
puts "===== Short String =====\n\n" | |
Benchmark.ips do |x| |
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
Okay, spend way too much time on this one. | |
But however, use the following command to install rotatelogs | |
sudo apt-get install apache2-utils | |
By default the binary file is only accessible with superuser priviliges. Move the file to /usr/sbin/. | |
sudo mv /usr/bin/rotatelogs /usr/sbin/ | |
Now you can gracefully start apache2 with custom logs ;) |
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
#lang racket | |
(require web-server/http | |
web-server/managers/none | |
web-server/servlet | |
web-server/servlet-env) | |
(provide interface-version manager star-polling-app) | |
(define interface-version 'v2) |
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
[program:uwsgi] | |
user=robdev | |
command=uwsgi --ini /path/to/config.uwsgi | |
autostart=false |
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
require 'rubygems' | |
require 'rest-client' | |
# Socksify is amazing handling Proxys, also Socks like tor | |
# The proxy is simply aviable in the whole script | |
require 'socksify' | |
TCPSocket::socks_server = "127.0.0.1" | |
TCPSocket::socks_port = 9070 | |
# Create a cookie |
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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |