Skip to content

Instantly share code, notes, and snippets.

@msuarz
msuarz / zip.rb
Last active December 25, 2015 21:19
zip it baby
#ugly
(0..servers.count - 1).each { |i| servers[i][:ip] = ips[i] }
#pretty
servers.each_with_index { |server, i| server[:ip] = ips[i] }
#beautiful
servers.zip(ips) { |server, ip| server[:ip] = ip }
@msuarz
msuarz / music.rb
Last active August 29, 2015 14:05
music folder cleanup
#encoding: IBM437
require 'rake'
require 'fileutils'
task :clean, :folder do |t, args|
Music.new(args.to_hash).cleanup
end
task :biggie, :folder do |t, args|
loadTasks = require 'load-grunt-tasks'
module.exports = (grunt) ->
env = process.env
cwd = process.cwd()
root = "#{cwd}/../../go"
src = "#{root}/src/#{env.src}"
command = (cmd, opts) ->
command: cmd