Skip to content

Instantly share code, notes, and snippets.

@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.
if [ `/usr/bin/whoami` = "root" ] ; then
export PS1="[\[\033[01;35m\]\u\[\033[00m\]@\h \W]\\$ "
fi
def cache
@cache ||= TorqueBox::Infinispan::Cache.new(
name: Settings.torquebox.services.DeviceHeartbeatMonitorService.cache_name,
- persist: Settings.torquebox.services.DeviceHeartbeatMonitorService.cache_persist_directory
+ persist: Settings.torquebox.services.DeviceHeartbeatMonitorService.cache_persist_directory,
+ mode: :replicated,
+ sync: false
Add a comment to this line
)
end
@binaryphile
binaryphile / .tmux.conf
Created January 29, 2015 19:00
.tmux.conf
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'C-v' rectangle-toggle