Skip to content

Instantly share code, notes, and snippets.

Mailo Světel roolo

Block or report user

Report or block roolo

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
roolo / index.html.erb_spec.rb
Created Aug 17, 2019
Rubocop — Layout/AlignHash
View index.html.erb_spec.rb
FactoryBot.create :user_subscription,
user: current_user,
subscription: FactoryBot.create(:subscription,
name: "My Subscription #{num}"
roolo / command.rb
Last active Nov 27, 2018
Generate Wifi QR code with Ruby
View command.rb
$ gem install rqrcode
$ irb -r rqrcode
2.5.3 :001 >'/tmp/wifi-connection.png', File::CREAT | File::WRONLY) {|f| f.write'WIFI:S:Wifi name;T:WPA;P:wifi password;;').as_png(size: 400)
roolo /
Created Nov 26, 2018
Rick and Morty episodes to watch
  • Total Rickall
  • Get Schwifty
  • Rickshank Rickdemption
  • Pickle Rick
  • A Rickle In Time
  • The Ricks must be crazy
  • Rick Potion #9
  • Auto Erotic Assimilation
roolo / remove-node-from-a-list.rb
Last active Sep 18, 2018
Removing node from a list
View remove-node-from-a-list.rb
class NumberListNode
attr_accessor :child, :value
def initialize child:, value:
@child = child
@value = value
roolo /
Created Aug 23, 2018
Ansible — machine alias
ansible-playbook -v --inventory inventory playbook.yaml
View Text_on_2_line_display.ino
#include <LiquidCrystal.h>
String lcdLine = "";
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.

Upgrading data from Postgres 9.4 to Postgres 9.5

Solving the The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.0. panic ;) This is mainly for Postgres installed via Homebrew, but you can adapt it to your system pretty easily.

View current_page_in_browser.rb
browserIntent = Android::Content::Intent::ACTION_VIEW,
startActivity browserIntent
roolo / Makefile
Last active Nov 21, 2015
Final Cut Pro X backups
View Makefile
rsync --verbose --recursive --delete --progress \
/Volumes/DATA\ 1/External\ FCP\ Library.fcpbundle/ \
/Volumes/DATA\ 2/External\ FCP\ Library.fcpbundle/
roolo / stairs.rb
Last active Aug 29, 2015
Do it once!
View stairs.rb
unless defined? @already"Plugins").add_item("Draw stairs") {
UI.messagebox("I'm about to draw stairs!")
# Call our new method.
}"Plugins").add_item("Reload stairs") {
load 'stairs.rb'
You can’t perform that action at this time.