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
<?php | |
/** | |
* IssuuClient hooks into Issuu's API | |
* | |
* example: | |
* include 'IssuuClient.php'; | |
* $issuu = new IssuuClient(pubKey, privKey, apiAdr); | |
* $issuu->openAction('issuu.document.url_upload'); | |
* $issuu->slurpUrl = 'pdfurl.pdf'; | |
* $issuu->executeAction(); |
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
root@Ubuntu-1204-precise-64-minimal ~ # | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
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
var lib = (function(settings){ | |
var defaults = {}; | |
settings = $.extend({}, defaults, settings); | |
var init = function(){ | |
}; | |
return init(); |
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
auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
metric 10 | |
auto eth1 | |
iface eth1 inet static | |
metric 20 |
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 'yaml' | |
require "fileutils" | |
require "zlib" | |
#STDOUT.sync | |
$error = false | |
$pretty_errors_defined = false | |
# Be less verbose by default | |
#logger.level = Logger::IMPORTANT |
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
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool YES |
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 | |
name=beta | |
disk=4096 | |
swap=1024 | |
mem=4096 | |
suite=precise | |
ip="192.168.199.199" | |
cpu=8 |
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
sudo fdisk -l | |
# choose swap partition id 82 ex. /dev/vda2 | |
sudo mkswap /dev/vda2 | |
sudo swapon /dev/vda2 | |
# verify | |
swapon -s |
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 | |
new=$(date +%Y-%m-%d) | |
remove_old=$(date -d '7 days ago' +'%Y-%m-%d') | |
backup_dir="/media/ftp/backups/" | |
temp_dir="/tmp/" | |
source="/home/backups/*" | |
new_backup_dir="$backup_dir$new" | |
echo "Create new daily backup dir $new_backup_dir" | |
mkdir -p "$new_backup_dir" |
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
import sublime, sublime_plugin, re, os | |
class GeneratorCommand(sublime_plugin.TextCommand): | |
def fixup(self, string): | |
return re.sub(r'\r\n|\r', '\n', string.decode('utf-8')) | |
def formalName(self, rawName): | |
return u"%s" % "".join([part.title() for part in rawName.split("_")]) |
OlderNewer