I hereby claim:
- I am dallasmarlow on github.
- I am dallasmarlow (https://keybase.io/dallasmarlow) on keybase.
- I have a public key whose fingerprint is 5A70 8865 409A BE1C EC42 7DC3 021B 58E4 A0CF A1B8
To claim this, I am signing this object:
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "math" | |
| "os" | |
| "path" | |
| "sort" | |
| "strconv" |
| function keyboard | |
| if [ $argv[1] = "disable" ] | |
| sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ | |
| else | |
| sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/ | |
| end | |
| end |
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "math" | |
| "os" | |
| "path" | |
| "sort" | |
| "strconv" |
| require 'json' | |
| # data src: | |
| # https://etherscan.io/exportData?type=address&a=<addr> | |
| abort 'usage: ./eth_summary.rb <from addr> <csv filename>' unless ARVG.size == 2 | |
| address = ARGV.first | |
| filename = ARGV.last | |
| def process(input) |
| from datetime import datetime | |
| import os, os.path | |
| import json | |
| def checkpoint_path(input_file): | |
| return '{}.checkpoint'.format( | |
| os.path.basename( | |
| input_file)) | |
| def load_checkpoint(checkpoint_file): |
I hereby claim:
To claim this, I am signing this object:
| require 'json' | |
| entries = File.read(ARGV.first).lines.map(&:chomp).reject {|l| l.empty?} | |
| keys = entries.shift.split(',').map(&:strip) | |
| usage_totals = entries.reduce({}) do |vals, e| | |
| cols = Hash[keys.zip(e.split(','))] | |
| vals[cols['Resource']] ||= 0 | |
| vals[cols['Resource']] += cols['UsageValue'].to_i | |
| vals |
| id=$(head /dev/random | md5) | |
| echo "${id:0:10}" |
| require 'elasticsearch' | |
| es = Elasticsearch::Client.new host: 'http://xx.xx.xx.xxx' | |
| es.indices.get_aliases.keys.each do |idx| | |
| if ['asp', 'html', 'perl', 'php', 'pl', 'cgi'].include?(idx.split('.').last) | |
| es.indices.delete index: idx | |
| end | |
| end |
| import hashlib | |
| challenge = 'xxx' | |
| secret = 'xxx' + "\n" | |
| print hashlib.sha256(challenge + "\n" + secret + challenge + "\n").hexdigest() |