This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am romeuhcf on github. | |
* I am romeuhcf (https://keybase.io/romeuhcf) on keybase. | |
* I have a public key ASACRh7aWrFw-4nozzqCZeE7Cp8a9Dh4vhZQciZyUr8-Wwo | |
To claim this, I am signing this object: |
This file contains hidden or 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 'net/http' | |
require 'uri' | |
def call(method:, host:, path: '/', query_parameters: {}) | |
method = method.to_s.downcase | |
method = method[0].upcase + method[1..] | |
uri = URI(File.join(host, path)) | |
uri.query = URI.encode_www_form(query_parameters) | |
# TODO POST raw payload |
This file contains hidden or 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
redis-cli EVAL 'local n = 0 ; local qs = redis.call("smembers","queues"); for _,q in ipairs(qs) do local qname = "queue:"..q ;if redis.call("llen", qname) == 0 then redis.call("srem", "queues", q) ; redis.call("del", qname); n = n+1 end end ; return n' 0 |
This file contains hidden or 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
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext("2d"); | |
canvas.width = 400; canvas.height = 300; | |
var mousePos = {x: 0, y:0}; | |
var lastFrameTimeMs = 0, | |
maxFPS = 60, |
This file contains hidden or 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
AllCops: | |
TargetRubyVersion: 2.5 | |
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop | |
# to ignore them, so only the ones explicitly set in this file are enabled. | |
DisabledByDefault: true | |
Include: | |
- '**/*.podspec' | |
- '**/*.jbuilder' | |
- '**/*.rake' | |
- '**/*.opal' |
This file contains hidden or 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
git fetch; git log --pretty=oneline production...origin/HEAD master --first-parent --merges | grep -v master..of | sed "s/.*branch '//; s/'.*//" |
This file contains hidden or 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
<h1>OI {{name}}</h1> | |
<h2>Hello, {{email}}</h2> | |
<img src="a.gif"/> |
This file contains hidden or 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
set -e | |
tee /etc/logrotate.d/bluepill << END | |
/var/log/bluepill.log { | |
rotate 7 | |
daily | |
missingok | |
notifempty | |
sharedscripts |
This file contains hidden or 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 CSV | |
def self.open(file, options={}, &block) | |
encoding = options.delete(:encoding) | |
File.open(file, "r:#{encoding}") do |fd| | |
yield CSV.new(fd, options) | |
end | |
end | |
end |
This file contains hidden or 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
alert('oi'); |
NewerOlder