Skip to content

Instantly share code, notes, and snippets.

View jbreams's full-sized avatar

Jonathan Reams jbreams

View GitHub Profile
@jbreams
jbreams / keybase.md
Created August 14, 2018 17:22
Keybase Proof

Keybase proof

I hereby claim:

  • I am jbreams on github.
  • I am jbreams (https://keybase.io/jbreams) on keybase.
  • I have a public key whose fingerprint is 0F28 FFFD B221 5900 07C7 17DE C961 66B8 1B8A F331

To claim this, I am signing this object:

@jbreams
jbreams / calculator.c
Last active June 4, 2016 17:43
This is a tutorial for learning C for people who don't know any C already!
// Let's learn C by writing a calculator!
//
// You shouldn't have to know anything about C or even programming really before beginning.
//
// This tutorial will be implementing a basic 4-function RPN calculators. You can read more
// about RPN calculators here https://en.wikipedia.org/wiki/Reverse_Polish_notation.
//
// First off, this is one way of writing comments. You can put two slashes anywhere on a line
// and the rest of the line will be a comment that's ignored by the C compiler
diff -ur binutils-2.26-old/ld/testsuite/ld-elfvsb/elfvsb.exp binutils-2.26-new/ld/testsuite/ld-elfvsb/elfvsb.exp
--- binutils-2.26-old/ld/testsuite/ld-elfvsb/elfvsb.exp 2015-11-13 03:27:42.000000000 -0500
+++ binutils-2.26-new/ld/testsuite/ld-elfvsb/elfvsb.exp 2016-04-20 12:49:12.792144978 -0400
@@ -339,7 +339,7 @@
|| [ string match $visibility "protected_weak" ]
|| [ string match $visibility "normal" ] } {
setup_xfail "powerpc-*-linux*"
- setup_xfail "s390x-*-linux*"
+ # setup_xfail "s390x-*-linux*"
if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
const char stringToPrint[] = "Hello, world!\n";
# Add this to your .bashrc to automatically detect running ssh-agents and connect to them.
if [ "x$SSH_AGENT_PID" = "x" ]; then
# Set the ssh-agent PID to the oldest ssh-agent owned by the current user
export SSH_AGENT_PID=$(pgrep -U $USER -o ssh-agent)
if [ "x$SSH_AGENT_PID" = "x" ]; then
eval $(ssh-agent)
else
# Find the auth socket for this PID in /tmp
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -type s -name agent.$((SSH_AGENT_PID - 1)) -print -quit 2>/dev/null)
diff --git a/site_scons/site_tools/distsrc.py b/site_scons/site_tools/distsrc.py
index d9e3f7f..861f5d9 100644
--- a/site_scons/site_tools/distsrc.py
+++ b/site_scons/site_tools/distsrc.py
@@ -34,16 +34,31 @@ class DistSrcFile:
return self.name
class DistSrcArchive:
- def __init__(self, archive_type, archive_file):
+ def __init__(self, archive_type, archive_file, filename, mode):
diff --git a/Makefile.am b/Makefile.am
index f375437..b219601 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -329,7 +329,8 @@ test_apps = \
test_bind_src_address \
test_metadata \
test_capabilities \
- test_xpub_nodrop
+ test_xpub_nodrop \
// Compile with clang++ -std=c++11 -g -o zmq_test zmq_test.cpp -lzmq
/**
* This demonstrates how a ZMQ_ROUTER socket can leave file descriptors
* open forever. Compile this, and then run it like so.
* One instance as a router:
* zmq_test router 7777
* That starts a router that listens on port 7777.
*
* Next, start a number of peers which connect to this router.
* zmq_test peer localhost 7777
@jbreams
jbreams / keybase.md
Created October 16, 2014 19:46
keybase.md

Keybase proof

I hereby claim:

  • I am jbreams on github.
  • I am jbreams (https://keybase.io/jbreams) on keybase.
  • I have a public key whose fingerprint is C15E 6F5A 7CA9 FCF1 D215 FFDD 3EEF 04B8 6370 E239

To claim this, I am signing this object:

@jbreams
jbreams / gist:f9f5d6a7aafd26072cd3
Created September 8, 2014 20:03
AWS SSH Key Init Script
#!/bin/bash
#
# Init file for AWS Authorized Keyfile
#
# chkconfig: 2345 11 25
# description: AWS Authorized Keyfile
case $1 in
start)
touch /var/lock/subsys/awssshkey