I hereby claim:
- I am brycesch on github.
- I am brycesch (https://keybase.io/brycesch) on keybase.
- I have a public key ASDG86SfmH1zppp8yJMGD5ITxTJMuj5bFjTp_7j244zmDgo
To claim this, I am signing this object:
require 'pg' | |
uri = '' | |
file = File.open('tmp/write.txt', 'w') | |
while true do | |
begin | |
conn = PG.connect( uri ) |
source 'https://rubygems.org' | |
gem 'eventmachine' | |
gem 'eventmachine-tail' | |
gem 'yajl' | |
gem 'ruby-kafka' |
config: | |
target: "ws://localhost:4000/socket/websocket?client_id=fb55a707-8f3a-4900-b095-0b971550c61d&vsn=2.0.0" | |
phases: | |
- duration: 60 # Test for 60 seconds | |
arrivalRate: 100 # Every second, add 10 users | |
rampTo: 1000 # And ramp it up to 100 users in total over the 60s period | |
name: "Ramping up the load" | |
- duration: 120 # Then resume the load test for 120s | |
arrivalRate: 100 # With those 100 users we ramped up to in the first phase | |
rampTo: 1000 # And keep it steady at 100 users |
module Webvtt | |
DEFAULT_MAX_CHAR_LENGTH = 40 | |
class Cue | |
attr_accessor :start, :end, :words | |
def initialize(words) | |
self.words = words | |
end | |
def to_s |
#!/bin/bash | |
# chmod a+x tails.sh | |
# nohup ./tails.sh foobar.log webhook_url & | |
# use nohup if you want the cammand to persist after your session ends | |
# | |
# slack | |
tail -n0 -F "$1" | while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
"payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2"; | |
done |
I hereby claim:
To claim this, I am signing this object:
class MysqlStringSanitizer | |
def self.sanitize(str) | |
str = str.force_encoding('utf-8').encode | |
clean_text = "" | |
# emoticons 1F601 - 1F64F | |
regex = /[\u{1f600}-\u{1f64f}]/ | |
clean_text = str.gsub regex, '' | |
#dingbats 2702 - 27B0 |
#!/bin/bash | |
# Do the following to create the pub.pem | |
# openssl rsa -in id_rsa -outform pem > id_rsa.pem | |
# openssl rsa -in id_rsa -pubout -outform pem > id_rsa.pub.pem | |
# gen rand key | |
openssl rand -base64 32 > key.bin | |
# timestamp for dump |
def redirect_to(options = {}, response_status = {}) | |
::Rails.logger.error("Redirected by #{caller(1).first rescue "unknown"}") | |
super(options, response_status) | |
end |
module_name = ARGV[0] | |
return "No module name given" unless module_name | |
files = Dir['/**/*.rb'] | |
files.each do |f| | |
f = File.open(f, "r+") | |
lines = f.readlines | |
f.close | |
output = File.new(f, "w") | |
output.write "module #{module_name}\n" |