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
# Copyright 2011 Ivan Storck | |
# Rakefile to manage automated local / remote sync of PHP projects like WordPress and Joomla | |
# Assumptions: | |
# Git is the version control system | |
# Only tested with ssh shortcuts in .ssh/config and public keys but should work with username and password too | |
# for WordPress , .gitignore ignores wp-config.php | |
# for Joomla, .gitignore ignores configuration.php | |
require 'rake' | |
require 'net/ssh' |
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/bash | |
# Install script for Latest WordPress by Johnathan Williamson - extended by Don Gilbert | |
# Disclaimer: It might not bloody work | |
# Disclaimer 2: I'm not responsible for any screwups ... :) | |
# DB Variables | |
echo "MySQL Host:" | |
read mysqlhost | |
export mysqlhost |
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
default_run_options[:pty] = true | |
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
require 'capistrano' | |
require 'rubygems' | |
require 'railsless-deploy' | |
set :application, "vault42.org" | |
set :deploy_to, "/usr/local/www/#{application}" | |
set :backup_dir, "/home/tomislav/backup" | |
set :use_sudo, false |
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
#encoding: UTF-8 | |
require 'rubygems' | |
require 'sinatra' | |
require 'erb' | |
require 'pp' | |
class Sinatra::Request | |
def pjax? | |
env['HTTP_X_PJAX'] || self['_pjax'] |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com) | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so | |
# WP's redirect_canonical doesn't do an infinite redirect of / |
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
# Title: Fancyimage tag for Jekyll | |
# Authors: Devin Weaver (photos_tag.rb), Brian M. Clapper (img_popup.rb), Patrick Paul (this gist) | |
# Description: Takes full size image, automagically creates thumbnail at specified size, +fancybox | |
# | |
# Adapted from: | |
# http://tritarget.org/blog/2012/05/07/integrating-photos-into-octopress-using-fancybox-and-plugin/ | |
# (photos_tag.rb) https://gist.github.com/2631877 | |
# (img_popup.rb) https://github.com/bmc/octopress-plugins/ | |
# | |
# Syntax {% photo filename [tumbnail] [title] %} |
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
proxy_cache_path /var/lib/nginx/cache/staticfiles levels=1:2 keys_zone=staticfilecache:60m inactive=90m max_size=50m; | |
proxy_temp_path /var/lib/nginx/proxy; | |
proxy_connect_timeout 30; | |
proxy_read_timeout 120; | |
proxy_send_timeout 120; | |
map $http_cookie $logged_in { | |
default 0; | |
~wordpress_logged_in 1; # Wordpress session cookie |
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/bash | |
sudo mkdir /db/tmpfs | |
sudo mount -osize=256m tmpfs /db/tmpfs -t tmpfs | |
sudo chmod 777 /db/tmpfs | |
# IMPORTANT edit your /etc/apparmor.d/usr.sbin.mysqld | |
# to match your new path | |
# so /var/lib/mysql -> /db/tmpfs/mysql/ (there must be 2 links) | |
# Then restart apparmor /etc/init.d/apparmor restart |
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 | |
PERCONA_PW=$1 | |
DEBCONF_PREFIX="percona-server-server-5.5 percona-server-server" | |
[ ! $# -eq 1 ] && echo "Usage: $0 PASSWORD" && exit 1; | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A | |
gpg -a --export CD2EFD2A | sudo apt-key add - | |
sudo sh -c 'cat <<EOF >/etc/apt/sources.list.d/percona.list |
OlderNewer