Skip to content

Instantly share code, notes, and snippets.

View jszakmeister's full-sized avatar

John Szakmeister jszakmeister

View GitHub Profile
@jszakmeister
jszakmeister / gist:75f58ed05586a69a448dd53cf311711c
Created February 7, 2018 12:00
Example with GIT_TRACE=1 and GIT_CURL_VERBOSE=1...
:: GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone https://github.com/google/breakpad.git
06:59:28.873440 git.c:344 trace: built-in: git 'clone' 'https://github.com/google/breakpad.git'
Cloning into 'breakpad'...
06:59:28.892350 run-command.c:627 trace: run_command: 'git-remote-https' 'origin' 'https://github.com/google/breakpad.git'
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.112...
* TCP_NODELAY set
* Connected to github.com (192.30.253.112) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
@jszakmeister
jszakmeister / gist:f843e62d27f0d0f9f9b643c3c611d7f2
Created February 7, 2018 11:57
Example output with GIT_CURL_VERBOSE=1...
Cloning into 'breakpad'...
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.113...
* TCP_NODELAY set
* Connected to github.com (192.30.253.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
@jszakmeister
jszakmeister / filehandle.py
Created December 13, 2016 09:35
Example showing file handle being re-used...
import os
f = os.open('file1.txt', os.O_RDWR | os.O_CREAT)
print("Handle1: {!r}".format(f))
os.close(f)
f = open('file2.txt', 'w+b')
print("Handle2: {!r}".format(f.fileno()))
f.close()
# Create a symlink that uses the serial number from the
# FTDI-based USB-to-Serial converter. Some distros have
# a version with the serial in /dev/serial/by-id, but I
# don't find it quite as friendly as this.
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSB-ftdi-$attr{serial}"
import threading
import time
from datetime import datetime
def foo():
while True:
print datetime.now()
time.sleep(1.0)
import coverage
inst = coverage.coverage(auto_data=False, branch=True, data_suffix=None,
source=['foo'])
inst.load()
inst.start()
import foo
inst.stop()
inst.combine()
inst.save()
@jszakmeister
jszakmeister / .gdbinit
Created November 25, 2014 11:43
gdbinit for Neovim (for debugging while running under LuaJIT)
set history filename .gdb-history
set history save on
set history size 2000
set env LD_PRELOAD /lib/x86_64-linux-gnu/libpthread.so.0
set env NVIM_PROG /home/jszakmeister/projects/neovim/build/debug/bin/nvim
set env VIMRUNTIME /home/jszakmeister/projects/neovim/runtime
path /home/jszakmeister/projects/neovim/.deps/usr/bin
set debug jit 1

Keybase proof

I hereby claim:

  • I am jszakmeister on github.
  • I am jszakmeister (https://keybase.io/jszakmeister) on keybase.
  • I have a public key whose fingerprint is 58B2 77C0 D208 F7AC 460C 07C8 4548 B3A8 C0D7 0C12

To claim this, I am signing this object:

@jszakmeister
jszakmeister / buildall.sh
Last active August 29, 2015 14:02
Script to help build multiple configurations of Neovim
#!/bin/bash
set -e
set +o pipefail
BASE_DIR="$(dirname "$0")"
cd "$BASE_DIR"
if test -t 1; then
COLOR_FAIL="\e[31;1m"
@jszakmeister
jszakmeister / gist:8040316
Created December 19, 2013 14:53
Aleph hanging on exit...
2013-12-19 09:52:04
Full thread dump OpenJDK Server VM (23.7-b01 mixed mode):
"Attach Listener" daemon prio=10 tid=0x8509c800 nid=0x1816 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"DestroyJavaVM" prio=10 tid=0xb650a400 nid=0x1719 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Hashed wheel timer #1" prio=10 tid=0x850cac00 nid=0x1775 waiting on condition [0x84f5c000]