Skip to content

Instantly share code, notes, and snippets.

Avatar
🛹

Pablo Orellana holamendi

🛹
  • Prague, Czech Republic
View GitHub Profile
@holamendi
holamendi / card.rb
Created Aug 9, 2017
Ruby script for bank coordinate cards
View card.rb
#!/usr/bin/ruby
# 1. Replace 00 with the numbers on your card
# 2. Run the script: card a1 f2 j5
# 3. Profit
CARD = {
a: %w(00 00 00 00 00),
b: %w(00 00 00 00 00),
c: %w(00 00 00 00 00),
View ejemplo_liquid.rb
# los drops son para definir que se puede exponer en un template
class ProductDrop < Liquid::Drop
def initialize(product)
@product = product
end
def name
@product[:name]
end
@holamendi
holamendi / gist:5143590
Last active Dec 14, 2015
Disable SQL log in Rails Console (3.1 +)
View gist:5143590
#Turn logs off
old_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
#Turn logs on again
ActiveRecord::Base.logger = old_logger
You can’t perform that action at this time.