Skip to content

Instantly share code, notes, and snippets.

function table() {
case "$1" in
flip)
echo "(╯°□°)╯︵ ┻━┻ "
;;
set)
echo "┬─┬ ノ( ゜-゜ノ)"
;;
man)
echo "(╯°Д°)╯︵ /(.□ . \)"
@prebenlm
prebenlm / .A how to display Irssi-hilights in OS X Notification Center.md
Last active September 20, 2024 16:55
Guide: how to make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier

Irssi in Mac OS X Notification Center

Mou icon

Overview

This guide will explain how you can make irc messages in a screen on a remote server appear in your Mac OS X Lion Notification Center with the help of terminal-notifier.

We will also explain how the process can be automatically started each time you log in to your Mac and ensure the connection to the server is kept alive.

@zts
zts / gist:4338458
Created December 19, 2012 17:18
How to configure git to push all branches automatically. This helps make "knife cookbook site install" do the right thing more often.
git config --add remote.origin.push 'refs/heads/*:refs/heads/*'
git config --add remote.origin.push 'refs/tags/*:refs/tags/*'
git config --add remote.origin.fetch 'refs/heads/*:refs/remotes/origin/*'
git config --add remote.origin.fetch 'refs/tags/*:refs/tags/*'
@addyosmani
addyosmani / gitback.rb
Created March 22, 2012 16:15
A little Ruby script for backing up *all* of the repos on your GitHub account with a single command
#gitback 0.1
#usage: sudo ruby gitback.rb
#credits: walter white, minor changes: addy osmani
#!/usr/bin/env ruby
# dependencies
require "yaml"
require "open-uri"
time = Time.new
@Simbul
Simbul / pre-commit
Created February 9, 2012 18:06
Git hook to prevent commits on a staging/production branch
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production"]
@jfryman
jfryman / a
Created December 20, 2011 15:09
class dnsmasq {
include dnsmasq::install
include dnsmasq::config
include dnsmasq::service
Class['dnsmasq::install'] -> Class['dnsmasq::config'] ~> Class['dnsmasq::service']
}
@jfcalvo
jfcalvo / digest.rb
Created October 3, 2011 09:28
Hash of files an strings with Ruby using MD5 and SHA256
require 'digest'
# Get SHA256 Hash of a file
puts Digest::SHA256.hexdigest File.read "data.dat"
# Get MD5 Hash of a file
puts Digest::MD5.hexdigest File.read "data.dat"
# Get MD5 Hash of a string
puts Digest::SHA256.hexdigest "Hello World"
# Get SHA256 Hash of a string using update
@kfatehi
kfatehi / nzb_import.rb
Created May 30, 2011 02:39
nn import script
#!/usr/bin/env ruby
=begin
Created by keyvan
#newznab on irc.synirc.net
This script is for importing a giant dump of NZB files into newznab. Be warned, it's HACKY!
1) I expect you have downloaded a big archive full of nzbs and have extracted it.
The directory structure should be like this:
dump/
MoviesHD/