I hereby claim:
- I am eddanger on github.
- I am mdub (https://keybase.io/mdub) on keybase.
- I have a public key ASCSwkQCzR1D_LShYysF4QGSRqMD8jqjLpGoib1MxW1yfQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This super lightweight Rails API project will contain the following bits of awesomeness to get you started on your new app.
"use strict"; | |
const ccxt = require ('ccxt') | |
const asTable = require ('as-table') | |
const log = require ('ololog').configure ({ locate: false }) | |
require ('ansicolor').nice; | |
// The amount of BTC I moved into my Bittrex account | |
const investedBTC = 0.18469975; |
Add com.coverall
file to /etc/pf.anchors
with:
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port = 80 -> 127.0.0.1 port 8080
rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on en2 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
Update pf.conf
to point to this new file a-la:
#!/usr/bin/env ruby | |
logfiles = Dir["#{ENV['HOME']}/**/app/../log/*.log"] # any file with a .log extension in a log directory besides an app directory... | |
logfiles.each {|file| system "echo '' > #{file}"} | |
puts "Cleaned #{logfiles.size} logs..." |
require 'rubygems' | |
require 'active_resource' | |
require 'basecamp' | |
require 'httparty' | |
require 'json' | |
GITHUB_USERNAME = '__GITHUB_USERNAME__' | |
GITHUB_PASSWORD = '__GITHUB_PASSWORD__' | |
GITHUB_ORG = '__GITHUB_ORG__' | |
GITHUB_REPO = '__GITHUB_REPO__' |
module Rack | |
class Censor | |
WORDS = [ 'shit', 'fuck', 'cock', 'cunt', 'cameltoe', 'mooseknuckle' ].map { |w| Regexp.new(w, Regexp::IGNORECASE) }.freeze | |
attr_reader :options, :request | |
def initialize(app, options={}) | |
@app, @options = app, { | |
:replacement => '*****' |
# http://sakurity.com/blog/2015/06/04/mongo_ruby_regexp.html | |
# There’s a subtle bug in BSON-ruby implementation, leading in best case | |
# scenario to low-severity DoS, but most likely to critical BSON Injection | |
# (similar to SQL injection) - depends on gem versions you use. | |
# b = Moped::BSON::ObjectId | |
# puts "Injection!" if b.legal? "a"*24+"\na" | |
# puts "DOS" if b.legal? "a"*24+"\n" |
I hereby claim:
To claim this, I am signing this object:
# Docs: http://smartinez87.github.io/exception_notification/ | |
module ExceptionNotifier | |
class SlackNotifier | |
def initialize(options) | |
# do something with the options... | |
@channel = options[:channel] || '#somechannel' | |
@team = options[:team] || 'someteam' | |
@token = options[:token] || '__top_secret_token__' | |
@username = options[:username] || 'somename' |