Skip to content

Instantly share code, notes, and snippets.

View forivall's full-sized avatar
🕴️
levitating

Emily Marigold Klassen forivall

🕴️
levitating
View GitHub Profile
@forivall
forivall / scanimage.log
Created August 26, 2015 07:45
libsane segfault
❯ scanimage -L
*** stack smashing detected ***: scanimage terminated
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7f58202a9055]
/usr/lib/libc.so.6(__fortify_fail+0x37)[0x7f58203305c7]
/usr/lib/libc.so.6(__fortify_fail+0x0)[0x7f5820330590]
/usr/lib/sane/libsane-as6e.so.1(+0x3b56)[0x7f5810019b56]
/usr/lib/sane/libsane-as6e.so.1(+0x3c10)[0x7f5810019c10]
/usr/lib/libsane.so.1(+0x1deb3)[0x7f58205f8eb3]
/usr/lib/libsane.so.1(sane_dll_get_devices+0xc2)[0x7f58205f97f2]
@forivall
forivall / simpleCoffeescriptNaturalSort
Created March 5, 2014 19:59
Simple (non-robust) Natural Sort in coffeescript
natcompare_re = /^(\D*)(\d*)([\s\S]*)$/
naturalCompare = (a, b) ->
return 0 if a is b
[__, a_word, a_num, a_rest] = natcompare_re.exec(a)
[__, b_word, b_num, b_rest] = natcompare_re.exec(b)
return (if a < b then -1 else 1) if a_word isnt b_word
return (+a_num) - (+b_num) if a_num isnt b_num
return naturalCompare a_rest, b_rest
@forivall
forivall / gist:fb35248bbe45be3fbcd0
Created September 26, 2014 23:06
Stupid ascii stuff
function toBinAscii(s) { return Array.prototype.map.call(s, function(c) { var bin = c.charCodeAt(0).toString(2); return '00000000'.substr(bin.length) + bin; }).join(' '); }
function fromBinAscii(s) { return String.fromCharCode.apply(String, s.split(/[ \r\n]+/).map(function(bin){ return parseInt(bin, 2); })); }
diff --git a/ext/zcache.zsh b/ext/zcache.zsh
index f33e762..9a58692 100644
--- a/ext/zcache.zsh
+++ b/ext/zcache.zsh
@@ -12,8 +12,9 @@ local dots__capture__file_load=""
local dots__capture__file=""
# TODO Merge this code with -antigen-load function to avoid duplication
--antigen-dump-file-list () {
-
diff --git a/ext/zcache.zsh b/ext/zcache.zsh
index 7ecfe1f..f33e762 100644
--- a/ext/zcache.zsh
+++ b/ext/zcache.zsh
@@ -158,9 +158,8 @@ function -zcache-done () {
# TODO add option
# if $_ANTIGEN_CACHE_MINIFY; then
- sed -i '/^#.*/d' $_zcache_payload_path
- sed -i '/^$/d' $_zcache_payload_path
@forivall
forivall / Comparison.md
Last active August 29, 2015 14:23
Antigen performance comparison

(using my dotfiles)

Time Speedup Time Speedup
Intel i5 2500K ''
ST400DX001 HDD ''
Arch Linux x64 Win 7 x64 Babun Cygwin
master 1.807 11.216
@forivall
forivall / gist:c4cdd698e3f1028e734b
Created June 23, 2015 17:18
Clang flags for completions for windows stuff
-fms-extensions, -Wno-microsoft, -fmsc-version=12, -D_M_AMD64=1, -D_M_X64=1, -D_HAS_CHAR16_T_LANGUAGE_SUPPORT=1
with includes
E:\Programs\Microsoft Visual Studio 12.0\VC\include
C:\Program Files (x86)\Windows Kits\8.1\Include\um
C:\Program Files (x86)\Windows Kits\8.1\Include\shared
C:\boost\boost_1_58_0
$ git help last && git last
`git last' is aliased to `show --oneline --name-status --decorate'
52e35cd (HEAD, tag: v0.41.0, origin/master, origin/HEAD, master) Prepare 0.41.0 release
M package.json
E:\Jordan\Code\repos\git\atom-build>apm test
[43852:0715/170651:INFO:renderer_main.cc(212)] Renderer process started
warning: removing Breakpad handler out of order
[41608:0715/170652:INFO:CONSOLE(56)] "Window load time: 756ms", source: file:///C:/Users/forivall/AppData/Local/atom/app-1.0.2/resources/app.asar/static/index.js (56)
[41608:0715/170847:INFO:CONSOLE(14)] "Unhandled promise rejection %o with error: %o", source: file:///C:/Users/forivall/AppData/Local/atom/app-1.0.2/resources/app.asar/static/index.js (14)
$ VAGRANT_LOG=info vagrant up
INFO global: Vagrant version: 1.7.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="c:\\HashiCorp\\Vagrant\\embedded\\gems\\gems\\vagrant-1.7.3\\bin\\vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="c:\\HashiCorp\\Vagrant\\embedded"
@forivall
forivall / plumb.js
Created July 26, 2015 06:58
plumb example
var fs = require('fs');
var through = require('through2');
var splitStream = require('split2');
var streamToArray = require('stream-to-array');
var throughStream = through(function(line, enc, callback) {
// R.E from feross/hostile (modified by forivall)
// console.log(line.toString());
var matches = /^\s*([^#]+?)\s+([^#]+?)\s*(?:$|#)/.exec(line);
// console.log(matches);