LocalBitcoins (for small amounts, cash)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def move(steps) | |
(steps % size).times { self << shift }; return self | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -y -loop 1 -i sebas.jpg -r 20 -t 3 begin.mpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'rake/testtask' | |
Rake::TestTask.new do |t| | |
t.libs << 'test' | |
t.libs << 'lib' | |
t.pattern = 'test/*_test.rb' | |
end | |
task default: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WestheimerRule | |
UNITS = %i(seconds minutes hours days weeks months years lustra decades | |
centuries millennniums) | |
def initialize(time:, unit:) | |
@time = time | |
@unit = unit | |
end | |
def estimate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App | |
REQUEST_METHOD = 'REQUEST_METHOD'.freeze | |
PATH_INFO = 'PATH_INFO'.freeze | |
attr_reader :env | |
def initialize(routes) | |
@routes = routes | |
@h = Hart.new(@routes) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom.commands.add 'atom-workspace', 'sebas:remove-comments', -> | |
editor = atom.workspace.getActivePaneItem() | |
buffer = editor.getBuffer() | |
buffer.replace /^(#| +#).*\n/g, '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: test | |
test: | |
@ruby -Ilib:test test/runner.rb "test/*_test.rb" | |
watch: | |
fswatch -0 -l0.1 ./lib/*.rb ./test/*.rb | xargs -0 -I {} make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARGV.select do |argument| | |
case argument | |
when /\*/ then | |
Dir.glob(argument).each do |file| | |
require File.expand_path(file) | |
end | |
else | |
require File.expand_path(argument) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.text.html': | |
'Make a label tag': | |
'prefix': 'lab' | |
'body': '<%= f.label :$1 %>' | |
'New scaffold :new': | |
'prefix': 'new' | |
'body': """ | |
<div class="page-header"> | |
<%= link_to ${1:resource}_path, class: \'btn btn-default pull-right\' do %> | |
<span class="glyphicon glyphicon-list-alt"></span>Volver |
OlderNewer