Skip to content

Instantly share code, notes, and snippets.

View flov's full-sized avatar
stay !false to yourself

Florian Vallen flov

stay !false to yourself
View GitHub Profile

Keybase proof

I hereby claim:

  • I am flov on github.
  • I am flowiz ( on keybase.
  • I have a public key ASAbLD0sVanmaKH6klM55CHROQvr40Ch2U4P44fqii6X-go

To claim this, I am signing this object:

require 'i18n/tasks'
require 'ruby_cowsay'
require 'lolcat'
RSpec.describe 'I18n' do
let(:i18n) { }
let(:missing_keys) { i18n.missing_keys }
let(:cows) { [
"beavis.zen", "bong", "bud-frogs", "bunny", "cheese", "cower",
"daemon", "default", "dragon-and-cow", "dragon", "elephant-in-snake",
  • I upgraded to ruby 2.2.2 since I had issues installing certain gems like nokogiri and others on ruby 1.9.3

  • I ran into an issue with polyglot which for some reason tried to require minitest: polyglot.rb:65:in require': cannot load such file -- minitest/unit (LoadError)` solution: add minitest to Gemfile

  • ran into a ruby 2.2.2 related error: dyld: Symbol not found: _rb_thread_select since ruby 2.2 this has been renamed to _rb_thread_select

flov / newrelic.yml
Last active December 19, 2015 10:09
# This file configures the New Relic Agent. New Relic monitors
# Ruby, Java, .NET, PHP, and Python applications with deep visibility and low overhead.
# For more information, visit
# Generated July 06, 2013
# This configuration file is custom generated for
flov / gist:3632726
Created September 5, 2012 07:39
Meta Programming!
class Supplier < ActiveRecord::Base
# delegate name, phone, description and contact if franchise is present
%w( name phone description contact ).each do |attribute|
define_method(attribute.to_sym) do
if self.attributes[attribute].present?
elsif franchise.present?
flov / vim tips
Created July 10, 2012 00:47
Learn Vim with it's most powerful commands, a brief description of the tips and tricks that I know and use day in day out
:r! echo '<p>PASTE IN</p>' | html2haml <--- Converts pasted code to haml
:r! rake routes <---- inserts output of rake routes in current file
Commands to explain:
- o, O, insert line below/above and change to insert mode
- A, go to insert mode at the end of line
- D, delete line from cursor till the end, does not jump into insert mode
- C, delete line from cursor till the end, jumps into insert mode
- f<character>/F<character> find next/previous character
- ci" ci' ci} ci) ca) ci) EXAMPLE: how to change what is inside the brackets in 'render_template(:edit)'
require 'open-uri'
require 'yaml'
(1..267).each do |x|
open("[]=#{x}") do |f|
if f.first
# anybody knows why it doesnt check if the string is empty before it executes the split ???
# I went through all x which dont work and substitude f.first with
# x!=112 and x!=122 and x!=124 and x!= 150 and x!=219 and x!= 240