Skip to content

Instantly share code, notes, and snippets.

@nwgh
nwgh / keybase.md
Created August 27, 2019 02:27
keybase.md

Keybase proof

I hereby claim:

  • I am nwgh on github.
  • I am nwgh (https://keybase.io/nwgh) on keybase.
  • I have a public key whose fingerprint is 67ED C5A0 BFC9 0A3D 147A B1A1 563B 6E25 96A7 0AAF

To claim this, I am signing this object:

@nwgh
nwgh / facebook.c
Created September 25, 2018 23:28
c-style blobs of h2 encoded headers
const char buffer0[] = {0x88, 0x40, 0x8c, 0xf2, 0xb7, 0x94, 0x21, 0x6a, 0xec, 0x3a, 0x4a, 0x44, 0x98, 0xf5, 0x7f, 0x01, 0x30, 0x40, 0x90, 0xf2, 0xb1, 0x0f, 0x52, 0x4b, 0x52, 0x56, 0x4f, 0xaa, 0xca, 0xb1, 0xeb, 0x49, 0x8f, 0x52, 0x3f, 0x85, 0xa8, 0xe8, 0xa8, 0xd2, 0xcb, 0x40, 0x90, 0x21, 0xea, 0x49, 0x6a, 0x4a, 0xc8, 0x29, 0x2d, 0xb0, 0xc9, 0xf4, 0xb5, 0x67, 0xa0, 0xc4, 0xf5, 0xff, 0xf5, 0x01, 0x90, 0xb2, 0x8e, 0xda, 0x12, 0xb2, 0x2c, 0x22, 0x9f, 0x2a, 0x48, 0x34, 0x8e, 0xe2, 0x91, 0xd0, 0x78, 0xee, 0x7d, 0xa0, 0x96, 0x1a, 0xb4, 0xac, 0x8b, 0x08, 0xa7, 0xca, 0xf2, 0x8c, 0x85, 0x8c, 0xe7, 0xea, 0xb9, 0x0f, 0x4a, 0x9f, 0x2b, 0xcb, 0x19, 0x24, 0xa9, 0x7a, 0x8a, 0x95, 0x3e, 0x57, 0x94, 0x64, 0x2c, 0x67, 0x3f, 0x55, 0xea, 0x2a, 0x54, 0xf9, 0x5e, 0x63, 0x9e, 0x6a, 0x0a, 0xb0, 0xea, 0x1d, 0x1e, 0x92, 0x62, 0x21, 0x72, 0x1e, 0x95, 0x3e, 0x57, 0xee, 0x6b, 0x13, 0x68, 0xe8, 0x28, 0xec, 0x4c, 0xeb, 0xd4, 0x54, 0xa9, 0xf2, 0xbc, 0xc7, 0x3c, 0xd4, 0x15, 0x72, 0x1e, 0x95, 0x02, 0x27, 0x57, 0x02, 0xe0, 0x5c, 0x37, 0x3e, 0x54
@nwgh
nwgh / mozilla-unified.code-workspace
Last active August 13, 2018 23:28
vs code workspace
{
"folders": [
{
"name": "Source",
"path": "gecko"
},
{
"name": "Build",
"path": "vscode-gecko"
}
@nwgh
nwgh / c_cpp_properties.json
Created February 1, 2018 18:16
obsolete/prototypes.h vs code bug
{
"configurations": [
{
"name": "Mac",
"compileCommands": "${workspaceRoot}/obj-dbg/compile_commands.json",
"includePath": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
@nwgh
nwgh / c_cpp_properties.json
Last active July 25, 2017 23:25
c_cpp_properties.json
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include/machine",

Keybase proof

I hereby claim:

  • I am nwgh on github.
  • I am todesschaf (https://keybase.io/todesschaf) on keybase.
  • I have a public key whose fingerprint is 2266 9CC2 4911 928E 471F 5761 8235 6753 3F45 A38E

To claim this, I am signing this object:

@nwgh
nwgh / compile_flags.txt
Last active September 12, 2016 23:01
LLDB VS Code Fail
~/s/m/gecko> ./mach compileflags netwerk/protocol/http/nsHttpChannel.cpp
/usr/local/clang/current/bin/clang++ -std=gnu++11 -fvisibility=hidden -fvisibility-inlines-hidden -DDEBUG=1 -DTRACING=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/Users/nwgh/src/mozilla/gecko/netwerk/protocol/http -I/Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/netwerk/protocol/http -I/Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/ipc/ipdl/_ipdlheaders -I/Users/nwgh/src/mozilla/gecko/ipc/chromium/src -I/Users/nwgh/src/mozilla/gecko/ipc/glue -I/Users/nwgh/src/mozilla/gecko/dom/base -I/Users/nwgh/src/mozilla/gecko/netwerk/base -I/Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/dist/include -I/Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/dist/include/nspr -I/Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /Users/nwgh/src/mozilla/gecko/obj-dbg-noopt/mozilla-config.h -Qunused-arguments -Qunused-arguments -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wi
@nwgh
nwgh / instructions.md
Last active August 30, 2016 18:18
How to set up your loaner to duplicate a one-click loaner

First, start a one-click loaner and in the shell, select item 2. Then, make a note of the command that runs (you'll need it for a step below). The first time I did this, I did mochitests, and the command line looked like /home/worker/workspace/mozharness/scripts/desktop_unittest.py --config-file /home/worker/workspace/mozharness/configs/unittests/linux_unittest.py --config-file /home/worker/workspace/mozharness/configs/remove_executables.py --no-read-buildbot-config --installer-url=https://queue.taskcluster.net/v1/task/<taskid>/artifacts/public/build/target.tar.bz2 --test-packages-url=https://queue.taskcluster.net/v1/task/<taskid>/artifacts/public/build/target.test_packages.json --mochitest-suite=plain-chunked --e10s --total-chunk=10 --this-chunk=2 --download-symbols=true --no-run-tests

For anything else to work, as root you first need to apt-get install python-virtualenv

Then, login as the regular user (cltbld is the default name)

  1. Make a directory for your work: mkdir $HOME/workspace (you can
@nwgh
nwgh / From CLI
Last active May 24, 2016 18:37
$SHELL -ilc env
~> $SHELL -ilc env
QT_GRAPHICSSYSTEM_CHECKED=1
XDG_SEAT=seat0
LANG=en_US.UTF-8
DISPLAY=:0
SHLVL=1
LOGNAME=nwgh
XDG_VTNR=1
CVS_RSH=ssh
PWD=/home/nwgh
@nwgh
nwgh / .zshrc
Created May 4, 2016 21:22
Minimal repro case for vscode issue
export MOZCONFIG="$HOME/src/mozilla/mozconfigs/linux_debug_noopt"