Skip to content

Instantly share code, notes, and snippets.

John Watson dctrwatson

Block or report user

Report or block dctrwatson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dctrwatson
dctrwatson / README.md
Last active Jun 21, 2019
Open Network Config for Mullvad OpenVPN
View README.md

Natively connect to Mullvad OpenVPN servers with ChromeOS.

Usage

  1. Download the example ONC file
  2. Open the file with Text and update Username with your account number
  3. Open chrome://net-internals/#chromeos
  4. Import the ONC file

Tip

View keybase.md

Keybase proof

I hereby claim:

  • I am dctrwatson on github.
  • I am wizputer (https://keybase.io/wizputer) on keybase.
  • I have a public key whose fingerprint is 42D9 E586 CF3A 9C83 385E 270E C558 DE36 65CB 8897

To claim this, I am signing this object:

View stat_accum_input_test.go
/***** BEGIN LICENSE BLOCK *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# The Initial Developer of the Original Code is the Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2013
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
View stat_accum_input_test.go
2014/02/27 14:50:54 missing unit separator
2014/02/27 14:50:54 missing call(s) to *pipeline.MockPluginHelper.PipelineConfig()
2014/02/27 14:50:54 missing call(s) to *pipeline.MockInputRunner.InChan()
2014/02/27 14:50:54 missing call(s) to *pipeline.MockInputRunner.Inject(is equal to &{[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] severity:7 0xc210087400 false 1 0 0xc210060fc0})
2014/02/27 14:50:54 missing call(s) to *pipeline.MockInputRunner.Ticker()
2014/02/27 14:50:54 aborting test due to missing call(s)
@dctrwatson
dctrwatson / gist:7763943
Created Dec 3, 2013
RAID adapter blocking due to a dead drive causing issues with Cassandra and pycassa
View gist:7763943
[21174748.746874] INFO: task jsvc:9672 blocked for more than 120 seconds.
[21174748.749104] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[21174748.751489] jsvc D ffffffff81806240 0 9672 9639 0x00000000
[21174748.751497] ffff8803436abe08 0000000000000082 ffff8800850bd000 ffffffffffffff98
[21174748.751516] ffff8803436abfd8 ffff8803436abfd8 ffff8803436abfd8 00000000000137c0
[21174748.751534] ffff88032bf39700 ffff8805fe535c00 ffff880622cf40c0 ffff8805fe535c00
[21174748.751553] Call Trace:
[21174748.751563] [<ffffffff8165ba6f>] schedule+0x3f/0x60
[21174748.751573] [<ffffffff8165d86d>] rwsem_down_failed_common+0xcd/0x170
[21174748.751583] [<ffffffff8165d923>] rwsem_down_write_failed+0x13/0x20
@dctrwatson
dctrwatson / gist:7534890
Created Nov 18, 2013
Git stats commands
View gist:7534890
# Top longest messaages
git log --format='%h%x00%an%x00%s%x00%B%x1e' | gawk 'BEGIN { FS="\0" ; RS="\x1e\n" }{ print length($4), $1, "-", $2, "|", $3 }' | sort -rn | head
# Top average messages
git log --format='%ae%x00%B%x1e' | gawk 'BEGIN { FS="\0" ; RS="\x1e\n" ; }{ sums[$1] += length($2) } END { for (i in sums) printf("%s %s\n", sums[i], i) }' | sort -rn | head
@dctrwatson
dctrwatson / gist:7206322
Last active Feb 12, 2018
Jank way to use instance storage automatically in EC2
View gist:7206322
#cloud-config
mounts:
- [ ephemeral0, /var, ext4, "defaults,noatime", "0", "2" ]
- [ swap, null ]
bootcmd:
- mkdir -p /tmp/root
- mount --bind / /tmp/root
- rsync -aq /tmp/root/var/lib/cloud /var/lib/
View vimrc
set runtimepath+=$GOROOT/misc/vim
set runtimepath+=$HOME/gocode/src/github.com/golang/lint/misc/vim
" Enable filetype plugin
filetype on
filetype plugin on
filetype plugin indent on
syntax on " Syntax highlighting
@dctrwatson
dctrwatson / graphite_multi_index.sh
Created Oct 1, 2013
Combine multiple whisper dirs into single index
View graphite_multi_index.sh
!/usr/bin/env bash
if [ $# -lt 1 ] ; then
echo "Need at least 1 whisper dir to index"
exit 1
fi
GRAPHITE_ROOT=${GRPHITE_ROOT:-"/opt/graphite"}
GRAPHITE_STORAGE_DIR=${GRAPHITE_STORAGE_DIR:-"${GRAPHITE_ROOT}/storage"}
@dctrwatson
dctrwatson / update_integration_test_apps.py
Created Aug 7, 2013
Update jenkins matrix build with config per python app
View update_integration_test_apps.py
import os
import re
import urllib
from lxml import etree
JENKINS_CONIG_URL = 'http://jenkins.local/job/integration-tests/config.xml'
BLACKLIST = set(('tests/integration/app1', 'tests/integration/app2', ))
def remove_root_from(path):
You can’t perform that action at this time.