Skip to content

Instantly share code, notes, and snippets.

Dan McGrady dmix

Block or report user

Report or block dmix

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
View gist:5a6e3fb75372876a7c2e
strace go install
execve("/usr/bin/go", ["go", "install", ""], [/* 50 vars */]) = 0
brk(0) = 0xaaa6e8
access("/etc/", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=192233, ...}) = 0
mmap(NULL, 192233, PROT_READ, MAP_PRIVATE, 3, 0) = 0x35c6a3b1000
close(3) = 0
open("/usr/lib/", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340`\0\0\0\0\0\0"..., 832) = 832
dmix / tether
Created Mar 3, 2015
Tether to android device on linux (automatically finds enp* card name and connects to it via dhcpcd)
View tether
# Find card name starting with enp and extract the string from the list
card=`ifconfig -a | ag enp | sed -e 's/.*\([^ ]*enp[^ ]*\).*/\1/g' | sed -e 's/://'`
# Start tethering with card
sudo dhcpcd $card
echo "Tethering to $card connected via USB, you sexy bitch"
View gist:9f022e30debb924dd513
### Keybase proof
I hereby claim:
* I am dmix on github.
* I am dmix ( on keybase.
* I have a public key whose fingerprint is F9C9 0898 3CBE 222A AA53 5FC3 3451 438C 4C6D 5567
To claim this, I am signing this object:
View gist:9700391
" vimrc shortcut
map vrc :e ~/.vimrc
" core
let mapleader="\<Space>"
set t_Co=256 " use 256 colors in terminator
" pathogen
silent! call pathogen#runtime_append_all_bundles()
dmix /
Created Mar 28, 2012
coffeescript to read/write to cookies
App.Functions.readCookie = (name) ->
nameEQ = name + "="
ca = document.cookie.split(";")
i = 0
while i < ca.length
c = ca[i]
c = c.substring(1, c.length) while c.charAt(0) is " "
return c.substring(nameEQ.length, c.length).replace(/"/g, '') if c.indexOf(nameEQ) is 0
View gist:1842439
2012-02-16T05:46:19+00:00 heroku[api]: Release v25 created by
2012-02-16T05:46:19+00:00 heroku[api]: Deploy f9a9f12 by
2012-02-16T05:46:20+00:00 heroku[slugc]: Slug compilation finished
2012-02-16T05:47:02+00:00 heroku[web.1]: State changed from created to starting
2012-02-16T05:47:02+00:00 heroku[api]: Scale to web=1 by
2012-02-16T05:47:07+00:00 heroku[web.1]: Starting process with command `lein run`
2012-02-16T05:48:07+00:00 heroku[web.1]: Stopping process with SIGKILL
2012-02-16T05:48:07+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2012-02-16T05:48:08+00:00 heroku[web.1]: Process exited with status 137
2012-02-16T05:48:08+00:00 heroku[web.1]: State changed from starting to crashed
View gist:1840261
(ns documeds.server
(:require [noir.server :as server]
[clojure.contrib.string :as contrib]))
(server/load-views "src/documeds/views/")
(defn https-url [request-url]
(str "https://" (:server-name request-url) ":" (:server-port request-url) (:uri request-url)))
(defn require-https
View gist:1475681
<div class="tweet">
View gist:1475679
(function() {
dust.register("tweet", body_0);
function body_0(chk, ctx) {
return chk.write("<div class=\"tweet\"><h3>").reference(ctx.get("user_name"), ctx, "h").write("</h3><p>").reference(ctx.get("tweet"), ctx, "h").write("</p></div>");
return body_0;
You can’t perform that action at this time.