Skip to content

Instantly share code, notes, and snippets.

@binaryphile
binaryphile / one-handed.ahk
Created August 31, 2012 17:38
Simple One-handed Keyboard Autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Toggle := False
$Space::
KeyWait, Space, T0.15 ; Adjust this value to control the delay before switching modes
If ErrorLevel
@binaryphile
binaryphile / gist:3500552
Created August 28, 2012 16:54
Autohotkey use Esc as modifier script
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
; This script uses Esc as a modifier key so that the keyboard can be used for directional keys (arrows, etc.)
@binaryphile
binaryphile / .golangci.yml
Created September 13, 2021 21:11
tell linter not to lint old files
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- diagnostic
- experimental
#!/usr/bin/env bash
app=( python3 module_design_analytics.py )
root_dir=/Users/pha212/Documents/ExtFin-EFS/smoke
main () {
local dir
local result
kill_process || true
@binaryphile
binaryphile / fdstat
Created June 20, 2017 13:35
file descriptor measurement tool
#!/usr/bin/env bash
fdsta_main () {
local num=${1:-5}
local user=${2:-$USER}
fds "$num" "$user"
}
fds() {
2017-05-09 15:13:18:902 INFO Loading configuration from: /home/vagrant/aview/etc/orientdb/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2017-05-09 15:13:19:170 INFO OrientDB Server v2.2.18 (build 3e8d46e73aa087fce245fa1125ab7d984a247f6e) is starting up... [OServer]
2017-05-09 15:13:19:174 INFO Databases directory: /home/vagrant/aview/data/orientdb [OServer]
2017-05-09 15:13:19:222 INFO OrientDB auto-config DISKCACHE=1,896MB (heap=3,925MB direct=524,288MB os=7,870MB) [OMemoryAndLocalPaginatedEnginesInitializer]
2017-05-09 15:13:19:379 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.36, socket=default) [OServerNetworkListener]
2017-05-09 15:13:19:381 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]
2017-05-09 15:13:19:385 INFO Found ORIENTDB_ROOT_PASSWORD variable, using this value as root's password [OServer]
2017-05-09 15:13:19:718 INFO ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2017-05-0
@binaryphile
binaryphile / Vagrantfile
Last active November 10, 2016 16:20
AView base box Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
private_key_path = File.join(Dir.home, ".ssh", "id_rsa")
public_key_path = File.join(Dir.home, ".ssh", "id_rsa.pub")
insecure_key_path = File.join(Dir.home, ".vagrant.d", "insecure_private_key")
ssh_config = File.join(Dir.home, ".ssh", "config")
host_config = <<CONFIG

Keybase proof

I hereby claim:

  • I am binaryphile on github.
  • I am binaryphile (https://keybase.io/binaryphile) on keybase.
  • I have a public key whose fingerprint is DE82 F645 E85F 8860 771C 7E3C 9AB3 68E7 C34D 62D4

To claim this, I am signing this object:

2016-09-21 10:52:58,421 ERROR [com.metamx.tranquility.beam.ClusteredBeam] (ClusteredBeam-ZkFuturePool-bf389713-9915-4288-ab08-87f72bd932c9) Failed to update cluster state: druid:overlord/wan_utilization: java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpMessage.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at com.twitter.finagle.http.netty.HttpMessageProxy$class.headers(HttpMessageProxy.scala:20) [com.twitter.finagle-http_2.11-6.31.0.jar:6.31.0]
at com.twitter.finagle.http.Message.headers(Message.scala:27) [com.twitter.finagle-http_2.11-6.31.0.jar:6.31.0]
at com.twitter.finagle.http.MessageHeaderMap.$plus$eq(HeaderMap.scala:145) [com.twitter.finagle-http_2.11-6.31.0.jar:6.31.0]
a
t com.twitter.finagle.http.MessageHeaderMap.$plus$eq(HeaderMap.scala:123) [com.twitter.finagle-http_2.11-6.31.0.jar:6.31.0]
at scala.collection.mutable.MapLike$class.update(MapLike.scala:88) [org.scala-lang.scala-library-2.11.7.jar:]
at com.twitter.finagle.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'