Skip to content

Instantly share code, notes, and snippets.

View jdub's full-sized avatar

Jeff Waugh jdub

View GitHub Profile
@jdub
jdub / git-log.txt
Created October 28, 2016 22:02
Typical project bringup
commit 3864158c885a93d18777c523c54413134ff89240
Author: Jeff Waugh <jdub@bethesignal.org>
Date: Sat Oct 29 09:00:48 2016 +1100
pants
commit 51f81f57945775491824ee20573db6667eee4cf2
Author: Jeff Waugh <jdub@bethesignal.org>
Date: Sat Oct 29 08:59:49 2016 +1100
@jdub
jdub / output
Created October 12, 2016 22:55
building brotli-sys with msvc using incremental gcc-rs
cargo:dec_include=D:\GitHub\brotli2-rs\brotli-sys\brotli/dec
cargo:enc_include=D:\GitHub\brotli2-rs\brotli-sys\brotli/enc
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-pc-windows-msvc")
debug=true opt-level=0
HOST = Some("x86_64-pc-windows-msvc")
TARGET = Some("x86_64-pc-windows-msvc")
TARGET = Some("x86_64-pc-windows-msvc")
// Place your settings in this file to overwrite the default settings
{
"rust.rustLangSrcPath": "C:\\Users\\jdub\\.multirust\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\src\\rust\\src"
}
@jdub
jdub / javascriptboolean.go
Last active April 26, 2016 16:31
JavaScriptBoolean type for unmarshalling truthy JSON
type JavaScriptBoolean bool
func (bit *JavaScriptBoolean) UnmarshalJSON(data []byte) error {
s := strings.ToLower(strings.Trim(string(data), `"`))
if s == "1" || s == "true" {
*bit = true
} else if s == "0" || s == "false" {
*bit = false
} else {
return fmt.Errorf("Boolean unmarshal error: invalid input %s", s)
@jdub
jdub / gist:c57f5e0cf27d04a1696eb1e7a458bb18
Created April 23, 2016 15:52
Selected Concourse worker process mounts under systemd restrictions
$ sudo egrep '(ext4|tmpfs .* noexec)' /proc/24967/mounts
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /var/lib/concourse/data/linux/graph/aufs ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /bin ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /boot ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /etc ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /lib ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /lib64 ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /sbin ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/dev/sda1 /usr ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
### Keybase proof
I hereby claim:
* I am jdub on github.
* I am jdub (https://keybase.io/jdub) on keybase.
* I have a public key ASDCqX3lmVe0ICqkYw_4OiPGqmYLMK0cjdM4bH1-wWWw0go
To claim this, I am signing this object:
ERROR: null
RESPONSE: { socket:
{ pair:
{ _secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
credentials: [Object],
_rejectUnauthorized: false,
@jdub
jdub / glxinfo-l.txt
Created May 24, 2011 11:54
glxinfo -l (IBM T42)
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
@jdub
jdub / gist:824435
Created February 13, 2011 04:19
node-twitter sitestreams, http vs. https
var twitter = new require('twitter')({
consumer_key: 'XXX',
consumer_secret: 'XXX',
access_token_key: 'XXX',
access_token_secret: 'XXX',
// sitestreams
site_stream_base: 'https://betastream.twitter.com/2b'
}),
params = {
follow: [ 4690301, 15352541 ],
var http = require('http'), cons = 0;
http.createServer(function(req, res) {
var mycon = ++cons;
res.writeHead(200,
{'Content-Type': 'text/plain'});
res.write('Hello... ');
setTimeout(function() {
res.end('world! #' + mycon + '\n');
}, 2000);
}).listen(8000);