Skip to content

Instantly share code, notes, and snippets.

View 3zcurdia's full-sized avatar

Luis Ezcurdia 3zcurdia

  • Mexico City
  • 11:50 (UTC -06:00)
View GitHub Profile
@3zcurdia
3zcurdia / sprite_gen.sh
Last active August 29, 2015 13:57
script to automate the sprite image generation using image magick and pngcrush
mkdir revised;
for file in *.png; do
filename=${file%.*}
ext=${file#*.}
mogrify -resize 128x128 -density 72 -units PixelsPerInch -write revised/$filename.128.$ext $file;
mogrify -resize 64x64 -density 72 -units PixelsPerInch -write revised/$filename.64.$ext $file;
mogrify -resize 32x32 -density 72 -units PixelsPerInch -write revised/$filename.32.$ext $file;
done
montage revised/*.png -geometry +2+2 -background 'rgba(0,0,0,0)' sprites.png
AW Aruba AWG nld pap
AF Afghanistan AFN prs ps tk
AO Angola AOA pt
AI Anguilla XCD en
AX Åland Islands EUR sv
AL Albania ALL sqi
AD Andorra EUR ca
AE United Arab Emirates AED ar
AR Argentina ARS gn es
AM Armenia AMD hye ru
@3zcurdia
3zcurdia / Gemfile
Last active March 17, 2016 19:26
Spider for missing translations
source 'https://rubygems.org'
ruby '2.3.0'
gem 'spidr'
gem 'colorize'

Keybase proof

I hereby claim:

  • I am 3zcurdia on github.
  • I am 3zcurdia (https://keybase.io/3zcurdia) on keybase.
  • I have a public key ASAJvpiiXO4TtYirLKk4qY3AgAfgL53AW4lXrURM039O9wo

To claim this, I am signing this object:

@3zcurdia
3zcurdia / cocoapods-bootstrap.sh
Last active September 29, 2017 21:37
Cocoapods bootstrap shell script
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew update;
brew upgrade;
brew install ruby;
ruby install cocoapods --no-doc;
pod setup;
require 'digest'
NUM_ZEROES = 6
class Block
def find_nonce(message)
nonce = "HELP I'M TRAPPED IN A NONCE FACTORY"
count = 0
until valid_nonce?(nonce, message)
print '.' if count % 10_000 == 0
@3zcurdia
3zcurdia / Gemfile
Last active November 28, 2018 20:46
Ruby Serializers benchmark
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
ruby '2.3.8'
# Specify your gem's dependencies in ams_vs_jbuilder.gemspec
gemspec
gem 'benchmark-ips'
gem 'active_model_serializers', '0.9.4'
@3zcurdia
3zcurdia / auditor.rb
Last active April 16, 2020 18:03
Gemfile.lock auditor
#!/usr/bin/env ruby
require 'HTTparty'
require 'nokogiri'
require 'colorize'
require 'action_view'
class Analyzer
def initialize(gem)
@gem = gem
@3zcurdia
3zcurdia / haml2erb.rb
Last active September 22, 2020 09:48
Haml to erb converter with herbalizer
#!/usr/bin/env ruby
require "httparty"
class Converter
def initialize(filename)
@content = File.open(filename).read
end
attr_reader :content
@3zcurdia
3zcurdia / bomb.rb
Created September 7, 2020 22:43
Ruby memory bomb
class Bomb
def method_missing(meth, *args, &blk)
self.class.send(:define_method, "is_#{meth}?") { true }
send("is_#{meth}?")
end
end
if __FILE__ == $0
require 'SecureRandom'
loop { Bomb.new.send(SecureRandom.hex) }