Skip to content

Instantly share code, notes, and snippets.

diff --git a/configure b/configure
index f137cf1..13b04f0 100755
--- a/configure
+++ b/configure
@@ -6275,9 +6275,10 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <stdlib.h>
#include <sys/types.h>
diff --git a/configure b/configure
index f137cf1..13b04f0 100755
--- a/configure
+++ b/configure
@@ -6275,9 +6275,10 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <stdlib.h>
#include <sys/types.h>
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
timer ticks | R(A) | R(B) | R(C) | P(A) | P(B) | P(C) | thread to run
------------|------|------|------|------|------|------|--------------
0 | | | | | | |
4 | | | | | | |
8 | | | | | | |
12 | | | | | | |
16 | | | | | | |
20 | | | | | | |
24 | | | | | | |
28 | | | | | | |
@rogerhub
rogerhub / gist:7855c727d5ce284eedf2
Created January 17, 2016 06:07
Duplicity 0.7.06 segmentation fault with librsync 2.0.0 on OS X

(January 16, 2016) I encounted a segmentation fault in the function rs_search_for_block of librsync while running the Duplicity backup tool. This crash appears to be related to this bug.

In the meantime, I used the following commands to switch back to old versions of librsync and duplicity:

brew switch librsync 0.9.7
brew switch duplicity 0.6.26_1
@rogerhub
rogerhub / smc.c
Created December 27, 2015 01:41
OS X script for getting fan speed and temperature, based off of Chris911/iStats
// clang -o smc smc.c -framework IOKit -framework CoreFoundation
/*
* Apple System Management Control (SMC) Tool
* Copyright (C) 2006 devnull
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
@rogerhub
rogerhub / sgdf-graph.py
Created December 8, 2015 09:02
Running time graph for SGDF.
from sgdf.fusion.alternatives.reference import *
from sgdf.fusion.alternatives.quickdescent import *
from sgdf.benchmarking.headless import *
import time
def b(algorithm, n):
mask = np.zeros((n, n), dtype=np.bool)
mask[n/4:3*n/4, n/4:3*n/4] = True
source = np.random.random((n, n, 3)).astype(np.float32)
@rogerhub
rogerhub / Outage.md
Last active March 4, 2016 09:01
RogerHub Monday 12/7/2015 Outage

RogerHub Monday 12/7/2015 Outage

The Final Grade Calculator was broken from approximately 2:21AM PST to 11:22AM PST (9 hours 1 minute) on December 7th 2015.

Root cause

The JavaScript for the Final Grade Calculator was out of date.

@rogerhub
rogerhub / fuse-zip-homebrew.md
Created October 8, 2015 02:29
fuse-zip fails to install via homebrew on OS X 10.11 with boxen (or non-standard homebrew path)

The gist of the problem is that brew install fuse-zip shows me something like this on OS X 10.11:

ar -cr libfusezip.a bigBuffer.o extraField.o fileNode.o fuse-zip.o fuseZipData.o
clang++ main.o -Xlinker -L/usr/local/libinstall -Llib -lfusezip -L/usr/local/lib -losxfuse -pthread -liconv  -L/opt/boxen/homebrew/Cellar/libzip/1.0.1/lib -lzip -lz  \
	    -v -o fuse-zip
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.11.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -w -o fuse-zip -Llib -L/opt/boxen/homebrew/Cellar/libzip/1.0.1/lib -L/opt/boxen/homebrew/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries main.o -L/usr/local
@rogerhub
rogerhub / sman
Last active October 29, 2015 01:29
A simple sync manager (depends on rsync, fswatch, python)
#!/usr/bin/env python2.7
import json
import logging
import multiprocessing
import os
import signal
import socket
import struct
import subprocess