Skip to content

Instantly share code, notes, and snippets.

@falsecz
falsecz / gist:977e686473f57ad5e7edb50d1e374dfb
Last active October 31, 2019 20:47
delete digital ocean bucket
## you need brew install parallel - paralel from moreutils doesn't work
## brew edit parallel add:
## `keg_only "My reason for making this keg-only"`
aws s3 ls "s3://sat-tiles" | awk '{print $2}' | /usr/local/opt/parallel/bin/parallel -j 400 "s3cmd del --recursive --force {.}"
@falsecz
falsecz / gist:4a78d945ffa8c9ceb275
Created September 14, 2015 17:42
socket io debug log
2015-09-14 19:41:08.161 TicTacIOiOS[1333:74661] SocketClient: Adding engine
2015-09-14 19:41:08.162 TicTacIOiOS[1333:74661] SocketEngine: Starting engine
2015-09-14 19:41:08.162 TicTacIOiOS[1333:74661] SocketEngine: Handshaking
2015-09-14 19:41:08.162 TicTacIOiOS[1333:74661] SocketEngine: Doing polling request
2015-09-14 19:41:08.286 TicTacIOiOS[1333:74661] SocketEngine: Got polling response
2015-09-14 19:41:08.288 TicTacIOiOS[1333:74661] SocketEngine: Got message: 0{"sid":"Mq4WNRJSTAcLsVvFAAAA","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":60000}
2015-09-14 19:41:08.289 TicTacIOiOS[1333:74661] SocketEngine: Doing polling request
2015-09-14 19:41:08.346 TicTacIOiOS[1333:74661] SocketEngine: Got polling response
2015-09-14 19:41:08.347 TicTacIOiOS[1333:74661] SocketEngine: Doing polling request
2015-09-14 19:41:08.347 TicTacIOiOS[1333:74661] SocketEngine: Got message: 40
@falsecz
falsecz / merge.sh
Created September 4, 2015 12:03
merge hbase regions
pbpaste | awk '{print $1}' | awk -F. '{print $2}' | grep -v "^$" | awk 'NR%2{printf $0" ";next;}1' | awk '{print "merge_region \x27"$1"\x27, \x27"$2"\x27"}'
@falsecz
falsecz / output
Last active August 29, 2015 14:24
Konec requestu
Spinkacek
Zkousim flush
Volam flush
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x4ed7d]
goroutine 21 [running]:
runtime.panic(0x2573c0, 0x3e87a4)
/usr/local/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:279 +0xf5
#!/bin/bash
FIRST=0
echo "tell application \"System Events\" to keystroke \"t\" using command down" | osascript
for var in "$@"; do
if [ "$FIRST" = 1 ]; then
echo "tell application \"System Events\" to keystroke \"d\" using command down" | osascript
fi
@falsecz
falsecz / backup.rb
Created May 27, 2015 12:05
hbase shell backup script
@s3 = "s3a://XXXX:XXXX@BUCKET/"
@libjars = `ls /opt/hbase/lib/*.jar | tr "\n" ","`
@ignore = [ /zipkin\..*/i, /.*_temp/i, /.*tmp/i, /test_.*/i, /.*_test/i, /.*_old/i ]
@mappers = "6"
include Java
java_import org.apache.hadoop.hbase.HBaseConfiguration
java_import org.apache.hadoop.hbase.client.HBaseAdmin
java_import org.apache.hadoop.hbase.snapshot.ExportSnapshot
@falsecz
falsecz / index.coffee
Created April 23, 2015 20:37
async breakout
## coffee --nodejs --expose-gc index.coffee
###
sam autor asyncu pise ze se to ma udelat takhle
https://github.com/caolan/async/pull/85#issuecomment-13072390
or just use a named function for the final callback and call that instead
of the task callback passed into the successful task function.
###

Keybase proof

I hereby claim:

  • I am falsecz on github.
  • I am falsecz (https://keybase.io/falsecz) on keybase.
  • I have a public key whose fingerprint is 75C5 084C F5B7 F4CA C962 026A 71B2 56BB E772 E4F8

To claim this, I am signing this object:

{
"name": "interlock",
"image": "ehazlett/interlock",
"version": "0.1",
"author": "ehazlett",
"description": "application router and load balancer",
"url": "https://github.com/ehazlett/interlock",
"config": {
"prompt_args": [
zkwatch = require './'
blockMe = (ms) ->
console.log "Block start"
d = new Date()
while new Date - d < ms
a = 1
console.log "Block end"
zk = new zkwatch