Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am birkirb on github.
  • I am stoicviking (https://keybase.io/stoicviking) on keybase.
  • I have a public key whose fingerprint is 53F7 568E 3933 5323 E6C1 B5B2 8E8D 23B5 B4E5 2C33

To claim this, I am signing this object:

@birkirb
birkirb / git-show-merged
Created February 28, 2011 07:29
Git show branches into which the current branch has been merged into.
#!/usr/bin/env ruby
# git-show-merged: a simple script to show you which topic branches the
# current branch has been merged into, and which it hasn't.
#
# git-show-merged Copyright 2010 Birkir A. Barkarson <birkirb@stoicviking.net>.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#!/bin/bash
# = USAGE
# git submodule reset
function submodule_paths {
ref=$(git ls-files --error-unmatch --stage -- . | grep "^160000" | awk '{print $4}' | uniq)
echo "${ref}"
}
; <<>> DiG 9.5.1-P3 <<>> litmus.cerego.co.jp
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4628
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 5, ADDITIONAL: 5
;; QUESTION SECTION:
;litmus.cerego.co.jp. IN A
# if you want the switch to include gem (slaved) remove the separate gem alternative command.
sudo update-alternatives --remove-all gem
# install ruby1.8 & friends with priority 500
# so this will be the default "auto" choice
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 500 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.8.1.gz \
--slave /usr/bin/ri ri /usr/bin/ri1.8 \
--slave /usr/bin/irb irb /usr/bin/irb1.8 \
--slave /usr/bin/rake rake /usr/bin/rake1.8 \
--slave /usr/bin/gem gem /usr/bin/gem1.8 \
#!/bin/bash
# = USAGE
# git ff
#
# = INSTALL
# gist 358659 > git-ff &&
# chmod 755 git-ff &&
# mv git-ff /usr/local/bin/git-ff
>>> Verifying ebuild manifests
>>> Starting parallel fetch
>>> Emerging (1 of 65) app-shells/bash-4.1_p2
* bash-4.1.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
>>> Downloading 'http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/bash41-001'
--2010-02-18 15:32:23-- http://ftp.jaist.ac.jp/pub/Linux/Gentoo/distfiles/bash41-001
Resolving ftp.jaist.ac.jp... failed: No address associated with hostname.
wget: unable to resolve host address `ftp.jaist.ac.jp'
export HISTFILESIZE=3000
export PROMPT_COMMAND='history -a;history -n'
shopt -s histappend
x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a}
@birkirb
birkirb / vimrc
Created June 2, 2009 02:28
My .vimrc
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.