Skip to content

Instantly share code, notes, and snippets.

View f440's full-sized avatar
🫥
-4/26

f440 f440

🫥
-4/26
View GitHub Profile
# -*- sh -*-
# [pbl](https://github.com/glidenote/pbl)
# A command line tool for Pinboard to search your bookmarks.
# [zaw](https://github.com/zsh-users/zaw)
# zsh anything.el-like widget.
function zaw-src-pbl() {
username=$(ruby -rpit -e 'puts Pit.get(:pinboard)[:username]')
password=$(ruby -rpit -e 'puts Pit.get(:pinboard)[:password]')
#!/usr/bin/env ruby
#-*- coding: utf-8 -*-
#
# This work is in the public domain.
#
class FizzBuzz
def initialize(argument)
if argument < 1
throw InvalidArgumentError
@f440
f440 / backup_clt.sh
Created July 28, 2012 05:46
Command Line Tools (OS X Mountain Lion) for Xcode - July 2012
mv /usr/share/man/man1/opendiff.1 /usr/share/man/man1/opendiff.1.clibackup
mv /usr/share/man/man1/ibtool.1 /usr/share/man/man1/ibtool.1.clibackup
mv /usr/bin/what /usr/bin/what.clibackup
mv /usr/share/man/man1/what.1 /usr/share/man/man1/what.1.clibackup
mv /usr/share/man/man1/opendiff.1 /usr/share/man/man1/opendiff.1.clibackup
mv /usr/share/man/man1/ibtool.1 /usr/share/man/man1/ibtool.1.clibackup
mv /usr/bin/what /usr/bin/what.clibackup
mv /usr/share/man/man1/what.1 /usr/share/man/man1/what.1.clibackup
@f440
f440 / Vagrantfile
Created June 4, 2012 13:46
Example for glusterfs
# 仮想マシン1-3はそれぞれ192.168.56.10,192.168.56.11,192.168.56.12にした
# (ホストマシンは 192.168.56.1)
Vagrant::Config.run do |config|
config.vm.define :host1 do |host1|
host1.vm.box = "CentOS-6.2-x86_64-minimal"
host1.vm.network :hostonly, "192.168.56.10"
end
config.vm.define :host2 do |host2|
host2.vm.box = "CentOS-6.2-x86_64-minimal"
@f440
f440 / Gemfile
Created June 3, 2012 09:51
guard-livereload for sphinx
source 'https://rubygems.org'
gem 'guard-livereload'
gem 'guard-shell'
gem 'foreman'
@f440
f440 / theme.html
Created May 5, 2012 16:54
tumblr theme (ultra lite)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
by:
____ ____ ____ ____ ____ ____ ____ ____
||D |||O |||I |||N |||W |||O |||R |||K ||
@f440
f440 / lxc-rpm-f440.repo
Created April 29, 2012 14:58
yum repository for lxc
[lxc-rpm-f440]
# for centos 6 only
name=lxc-CentOS-$releasever
baseurl=https://raw.github.com/f440/lxc-rpm/master/centos/$releasever/os/x86_64/
enabled=1
gpgcheck=0
# ref: https://raw.github.com/gist/1849889/zaw-git-branch.zsh
function zaw-src-hg-branch() {
hg stat >/dev/null 2>&1
if [[ $? == 0 ]]; then
candidates=(`hg branches | cut -d ' ' -f 1`)
fi
actions=("zaw-src-hg-checkout" "zaw-callback-append-to-buffer")
act_descriptions=("hg update" "append to edit buffer")
}
# ref: https://raw.github.com/gist/1849889/zaw-git-branch.zsh
function zaw-src-hg-bookmark() {
hg stat >/dev/null 2>&1
if [[ $? == 0 ]]; then
candidates=(`hg bookmarks | sed -e 's/\*//' | awk '{print $1}'`)
fi
actions=("zaw-src-hg-checkout" "zaw-callback-append-to-buffer")
act_descriptions=("hg update" "append to edit buffer")
}
require 'formula'
class Automake < Formula
url 'http://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz'
homepage 'http://www.gnu.org/software/automake'
md5 'fab0bd2c3990a6679adaf9eeac0c6d2a'
version "1.11"
def install