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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
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
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |
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
@$mysqli = new mysqli( | |
$databases['default']['default']['host'], | |
$databases['default']['default']['username'], | |
$databases['default']['default']['password'], | |
$databases['default']['default']['database'] | |
); | |
if (mysqli_connect_error()) { | |
require_once DRUPAL_ROOT . '/error.inc'; | |
exit(); | |
} |
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
# Automating server inventory | |
Some of the most useful information you will likely want to collect if you are maintaining a profile of each of the servers you manage includes: | |
* the server name | |
* its IP address | |
* the number of CPUs and cores | |
* the processor speed | |
* your disk sizes | |
* what OS is in use |
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
# update your application db | |
apt-get update | |
# install dependencies | |
sudo apt-get install build-essential libcurl4-openssl-dev | |
# clone the cpuminer vertcoin repository | |
git clone https://github.com/Bufius/cpuminer-vert.git | |
# cd into it |
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
<% | |
def hellow_tumblr | |
puts "Welcome to my new Tumblr blog" | |
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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y -f install build-essential | |
apt-get -y install ruby1.9.1 rubygems1.9.1 ri1.9.1 rdoc1.9.1 ruby1.9.1-dev g++ irb1.9.1 libopenssl-ruby1.9.1 openssl | |
gem install chef right_aws --no-ri --no-rdoc |
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 'mysql' | |
con = Mysql.new('localhost','root', '') | |
rs = con.query('show databases') | |
databases = [] | |
rs.each_hash do |h| | |
databases << h['Database'] | |
end | |
databases.each do |db| |
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
# put this at ~/.gitconfig | |
[alias] | |
# I'm lazy, so two letters will always trump the full command | |
co = checkout | |
ci = commit | |
cp = cherry-pick | |
st = status | |
br = branch |
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
Dir.glob('./**/*.orig') do |file| | |
File.delete(file) | |
end |