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
199,- |
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
git branch | grep -v master | while read b; do test 0 -eq `git diff origin/$b $b 2>/dev/null | wc -l` && git branch -D $b; done |
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
brew install pdns |
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
class Delayed::Job | |
scope :waiting, lambda{where(failed_at: nil).where(locked_at: nil)} | |
def self.include?(object, method_name = nil, queue = :default) | |
object_class = object.respond_to?(:id) ? object.class : object | |
object_id = object.respond_to?(:id) && object.id | |
waiting.where(queue: queue).detect do |job| | |
o = job.payload_object.object | |
m = method_name.present? ? job.payload_object.method_name : nil | |
o_class = o.respond_to?(:id) ? o.class : o |
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
caller.select{|c| c =~ /app\/model/} |
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
apt-get install wget sudo gzip dpkg genisoimage | |
mkdir debian-netinst | |
cd debian-netinst | |
wget http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso | |
wget http://ftp.dk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.37_all.deb | |
mkdir iso | |
sudo mount -o loop debian-6.0.7-amd64-netinst.iso iso/ | |
mkdir new_iso | |
cp -av iso/. new_iso/ | |
sudo umount iso |
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
1) Install MySQL <http://dev.mysql.com/> | |
2) Install Homebrew <http://mxcl.github.com/homebrew/> | |
3) $ brew install boost boost-jam lua pkg-config wget | |
4) $ wget http://downloads.powerdns.com/releases/pdns-3.0.1.tar.gz && tar xzf pdns-3.0.1.tar.gz | |
5) $ cd pdns-3.0.1 && ./configure --with-mysql-includes=/usr/local/mysql/include && make && make install | |
6) Adjust /usr/local/etc/pdns.conf to your mysql setup | |
7) cat /System/Library/LaunchDaemons/pdns_server.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
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 | |
# | |
## | |
## Delete merged Git branches from the origin remote. | |
## | |
## Options: | |
## -f Really delete the branches. Without this branches are shown | |
## but nothing is deleted. | |
## |