Skip to content

Instantly share code, notes, and snippets.

Konstantin Haase rkh

Block or report user

Report or block rkh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am rkh on github.
  • I am rkh (https://keybase.io/rkh) on keybase.
  • I have a public key ASAmJ6TToFvzvSUw2pT2ehsnpK5dR5NpJ8tTIDXWB4tRbQo

To claim this, I am signing this object:

View keep_position.js
var scrollPosition = sessionStorage.getItem("scrollPosition")
if(scrollPosition) window.scrollTo(0, scrollPosition)
document.addEventListener("scroll", function() {
sessionStorage.setItem("scrollPosition", window.pageYOffset | document.body.scrollTop)
})
View keybase.md

Keybase proof

I hereby claim:

  • I am rkh on github.
  • I am rkh (https://keybase.io/rkh) on keybase.
  • I have a public key whose fingerprint is 5D7E E93A 4ABE 388A 0526 E2E8 7173 AC78 7259 8CF7

To claim this, I am signing this object:

View install.sh
curl https://gist.githubusercontent.com/rkh/1ee2da1420fa28022fe5/raw/travis.sh -sSL > travis
chmod +x travis
./travis install
View .travis.yml
language: ruby
notifications:
irc:
channels:
- "chat.freenode.net#my-channel"
template:
- "%{repository} (%{commit}) : %{message}"
- "Build details: %{build_url}"
View head.sh
# install ruby-head binary from https://rubies.travis-ci.org/
echo rvm_remote_server_url3=https://rubies.travis-ci.org > ~/.rvm/user/db
rvm get head
rvm reinstall ruby-head --binary
View .travis.yml
language: c
compiler:
- gcc
- clang
# Change this to your needs
script: ./configure && make
View build_ruby.sh
export repo="ruby" # can also be jruby
export version="ruby-2.1.1" # full rvm qualifier
gem install travis
gem install travis-cli-gh
curl -H 'Authorization: `travis gh-signature -r $repo/$repo`' -i http://rubies.travis-ci.org/rebuild/$version -X POST
@rkh
rkh / warning_filter.rb
Created Feb 21, 2014
Run Ruby with warnings enabled. Without going crazy.
View warning_filter.rb
require 'delegate'
module Support
class WarningFilter < DelegateClass(IO)
def write(line)
super if line !~ /^\S+gems\/ruby\-\S+:\d+: warning:/
end
end
end
View gist:9011494
Ahhhhhhhhh
Ya ya yaaaah
Ya ya yaaah
Yaaah ya yah
Ohohohohoooo
Oh ya yaaah
Ya ya yaaah
Yaaah ya yah
You can’t perform that action at this time.