Skip to content

Instantly share code, notes, and snippets.


R Gibim Drowze

  • Fusioneer Software
  • Dublin, Ireland
  • @r_gibim
View GitHub Profile
View graylog_api.rb
require 'bundler/inline'
require 'minitest/autorun'
gemfile do
source ''
gem 'http'
require 'http'
require 'cgi'
View gist:d73fc62c4fd31d1cf6958b340900f723
RSpec.describe 'Testing' do
it 'is flagged' do
x = []
expect { x.append(1) }.to change(x, :size)
Drowze / test.rb
Last active Jun 20, 2019
RSpec bug on allow with block syntax #rspec #ruby #bug #bug-report
View test.rb
require 'bundler/inline'
gemfile do
source ''
gem 'rspec'
puts 'Ruby Version ' + RUBY_VERSION.to_s
puts 'RSpec version ' + RSpec::Core::Version::STRING.to_s
Drowze / compositional_fun.rb
Last active Jun 7, 2019
composition operator fun (using ruby 2.7 preview 1)
View compositional_fun.rb
class SubtractTwoInteraction
number - 2
class MultiplyByInteraction
def, by:)
number * by
Drowze / Suppressing undesired gem
Created Sep 26, 2018
Suppressing undesired gem/library load. Useful when your project has a undesired gem being loaded. This makes advantage of .pryrc (but irbrc could theorically also be used)
View Suppressing undesired gem

My project .pryrc contained awesome_print load, which I do not appreciate.

require 'awesome_print'

To patch against the .pryrc, which I could not edit at the time, I created another .pryrc at my home folder (~/.pryrc):

module Kernel
  alias :old_require :require

Medieval Network!

In the early middle ages, where magic reigns and the dragons breath, the world nearly came to an end if not by the bravery of the mightiest wizards. Those, who do their magic writing lines of gibberish language may now save the humanity, but not without a social network to orchestrate their plans.

Features that shall belong

Such a crucial network shall never see the light of the day having it not the following:

  • Wizard creation A wizerd has no less than the following: name, age, gender, location (lat,long). A wizard has a bag as well, which shall be filled with gold, food, beer, life potions and mana potions.
function vmux --description 'Use tmux inside vagrant instance'
vagrant ssh -- -t 'tmux attach $@'
Drowze /
Last active Jul 30, 2018
function update-master --description "update master branch"
set __CUR_BRANCH (git rev-parse --abbrev-ref HEAD)
git checkout master
git pull
git checkout $__CUR_BRANCH
set -e __CUR_BRANCH
function cur_branch --description "Returns the name of the current git branch"
git rev-parse --abbrev-ref HEAD
Drowze / Removing audio tracks from
Last active Mar 28, 2018
#mkv #mkvmerge Remove audio/subtitle from a batch of mkv files
View Removing audio tracks from

Get the ids of the tracks with mkvinfo <file name> e.g.:

video 0
audio_disliked 1 (default)
audio_liked 2
subtitles_disliked 3 (default)
subtitles_liked 4
You can’t perform that action at this time.