Skip to content

Instantly share code, notes, and snippets.

View bumi's full-sized avatar

Michael Bumann bumi

View GitHub Profile
@bumi
bumi / gist:7409409
Created November 11, 2013 07:51
boxen trying to resolve ruby dep
[Librarian] Resolving ruby (= 6.99.26) <boxen/puppet-ruby>
[Librarian] No known prior constraints
[Librarian] Checking manifests
[Librarian] Checking ruby/6.7.4 <boxen/puppet-ruby>
[Librarian] Backtracking from ruby/6.7.4 <boxen/puppet-ruby>
[Librarian] Checking ruby/6.7.3 <boxen/puppet-ruby>
[Librarian] Backtracking from ruby/6.7.3 <boxen/puppet-ruby>
[Librarian] Checking ruby/6.7.2 <boxen/puppet-ruby>
[Librarian] Backtracking from ruby/6.7.2 <boxen/puppet-ruby>
[Librarian] Checking ruby/6.7.1 <boxen/puppet-ruby>
@bumi
bumi / git.txt
Created October 23, 2013 15:38
Some links on where you find help to get started with git
* http://www.youtube.com/user/GitHubGuides/videos - github video guides
* http://gitimmersion.com/ - a guided tour that walks through the fundamentals of git.
* http://try.github.io/ - an interactive git tutorial to try and learn the basic git commands
* http://training.github.com/ - the github training page. they offer free git webinars
* https://www.codeschool.com/courses/git-real - git course on code school. great interactive course by the codeschool peeps.
* http://opentechschool.github.io/social-coding/ - the opentechschool course
* http://rogerdudler.github.io/git-guide/ - another simple and short git guide
* http://think-like-a-git.net/ - think like a git
* http://git-scm.com/book - full book about git. if you want to learn everything
* http://git-scm.com/book/en/Getting-Started-Git-Basics - a more technical introduction
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module MyEqlMatcher
class SoEqual
def initialize(expected)
@allowed_params = expected
end
def for_class(klass)
@klass_name = klass.name
@model = klass
self
require "ezcrypto"
require "json"
encrypted = CGI.escape Base64.encode64(EzCrypto::Key.with_password("password", "salt").encrypt({"amount" => 1000, "currency" => "eur"}.to_json)).gsub(/\n/,'')
puts "---------------"
decrypted = EzCrypto::Key.decrypt_with_password "password", "salt", Base64.decode64(encrypted)
puts decrypted
puts JSON.parse(decrypted)["amount"]
@bumi
bumi / as_block.rb
Last active December 18, 2015 21:49
CheckIt.check do
command "elasticsearch"
help "doc/elasticsearch/readme.mdown"
end
CheckIt.check do
url "http://localhost:9200" => /"ok": true/i
help "doc/elasticsearch/readme.mdown"
end
@bumi
bumi / travis-deploy.rb
Last active December 18, 2015 18:19
little script to be run after_success on Travis-CI to push to a configurable deploy branch. I'm using it to deploy successful builds with chef: if the master is green push the code to master_green. from there it get's deployed with chef
#!/usr/bin/env ruby
# HOWTO:
# copy this file to script/travis-deploy
# chmod +x script/travis-deploy
# add the following to your .travis.yml
# after_success:
# - "script/travis-deploy"
@bumi
bumi / post-merge
Created June 4, 2013 14:55
post-merge hook to automatically run bundle install and rake db:migrate if needed
#!/bin/sh
# INSTALL
#
# make sure you have installed lolcat and cowsay
# brew install cowsay
# gem install lolcat
#
# filename: post-merge
#
@bumi
bumi / heisenbug.rb
Last active December 16, 2015 05:09
module Heisenbug
class Operation
attr_accessor :runlist, :return_value
def initialize
self.runlist = []
yield self
end
def use(bug)
@bumi
bumi / AfricaHackTrip_recap_3.md
Created November 16, 2012 16:23 — forked from gr2m/AfricaHackTrip_recap_3.md
3rd recap of the AfricaHackTrip project. Find out more at www.africahacktrip.org

We've made some great progress in the past two weeks, thanks y'all!

  1. New Website online
  2. New timeframe for project + survey
  3. Hackathon on Dec 1st/2nd
  4. First contact with Nairobi
  5. Team meeting on Monday
  6. Vacant team roles
  7. Misc