Skip to content

Instantly share code, notes, and snippets.

Joe Savage joesavage

Block or report user

Report or block joesavage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joesavage
joesavage / commands.txt
Last active Aug 11, 2016
`dwarfdump` on macOS and Linux
View commands.txt
=== macOS
$ clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
<snip>
$ clang hello.c -g -o hello.out
$ dwarfdump hello.out # NOTE: macOS-specific binary that reads Mach-O rather than ELF executables
----------------------------------------------------------------------
File: hello.out (x86_64)
----------------------------------------------------------------------
.debug_info contents:
View gist:21c02946e9a6e6448ca8303b3df3970a
# /etc/csh.login OR ~/.login
setenv SHELL /bin/bash
exec /bin/bash -l
View Afterglow
Background: #202020
Font: Monaco, 11pt
Text: #CFCFCF
Bold Text: #CFCFCF
Selection: #CFCFCF (65% Opacity) / #9C9C9C
Cursor: #CFCFCF
ANSI Colours:
Black (0): #151515
Bright Black (8): #3E3E3E
Red (1): #9A2D32
@joesavage
joesavage / after.js
Created Mar 15, 2016
emscripten_suspend web worker test case
View after.js
self.addEventListener('message', (function(e) {
var data = e.data;
switch (data.cmd) {
case 'init':
(function() {
run();
var desiredInput = "success";
var insertChar = (function(i, self) {
Module.userInput.push(desiredInput.charCodeAt(i));
Module.resume("char_ready");
View after.js
(function() {
var desiredInput = "success";
var insertChar = (function(i, self) {
userInput.push(desiredInput.charCodeAt(i));
Module.resume("char_ready");
if (i < desiredInput.length) {
return setTimeout((function() { self(i + 1, self) }), Math.floor(Math.random() * 1500));
}
});
insertChar(0, insertChar);
View gist:8ddd76d5b9292557befe
row(0, R, R) :- !.
row(N, R, Acc) :- L is N - 1,
row(L, R, [N | Acc]).
% LESS EFFICIENT VERSION:
% row(0, []) :- !.
% row(N, R) :- L is N - 1,
% row(L, S),
% append(S, [N], R).
@joesavage
joesavage / zz.countries.nerd.dk.rbldnsd
Created Jul 26, 2014
zz.countries.nerd.dk.rbldnsd
View zz.countries.nerd.dk.rbldnsd
This file has been truncated, but you can view the full file.
$SOA 7200 countries-ns.mdc.dk. read.the.homepage.at.http.countries.nerd.dk. 2013013100 28800 7200 604800 7200
5.224.7.0/24 :127.0.0.20:ad
5.224.254.0/23 :127.0.0.20:ad
5.225.7.0/24 :127.0.0.20:ad
5.225.254.0/23 :127.0.0.20:ad
31.201.76.0/24 :127.0.0.20:ad
37.19.14.248/29 :127.0.0.20:ad
37.222.7.0/24 :127.0.0.20:ad
37.222.254.0/23 :127.0.0.20:ad
View dabblet.css
body {
background: #222;
text-align: center;
}
input {
font-size: 1.5em;
width: 20em;
margin-top: 2em;
}
View gist:7613586
# Basic Rewrites
location ~ ^(.*/)index(\.html)?$ { return 301 $scheme://$host$1; }
location ~ ^(/.+)\.html$ { return 301 $scheme://$host$1; }
location ~ /$ {
# 'try_files' > 'index', to avoid re-write/location rules.
try_files $request_uri/index.html $request_uri/index.php =404;
}
try_files $uri.html $uri/ =404;
View gist:6172587
http://boinc.berkeley.edu/
http://boinc.berkeley.edu/addon_item.php?platform=web&item=http%3A%2F%2Fapps.facebook.com%2Fprocessors%2Fnew.php
http://boinc.berkeley.edu/addon_item.php?platform=web&item=http%3A%2F%2Fapps.facebook.com%2Fboinc_milestones%2F
http://www.mersenne.org/
http://folding.stanford.edu/
http://folding.stanford.edu/home/teams-stats/
http://fold.it/portal/
You can’t perform that action at this time.