Skip to content

Instantly share code, notes, and snippets.

@asivitz
asivitz / genpanic.sh
Last active March 6, 2018 06:22
A bash script to generate giant stack project with many sub-packages to reproduce the "load commands size" panic on High Sierra
#!/bin/bash
# Reproduce "load command size" panic on MacOS High Sierra
# $ sh genpanic.sh
# $ cd panic
# $ stack build panic
mkdir panic
cd panic
#!/usr/bin/env ruby
# Usage
#
# ./color-schemer.rb
# -> Pulls a random color scheme from colourlovers.com and outputs the values to sass/colors.scss
# The colors are names $color0, $color1, $color2, $color3, $color4
#
# ./color-schemer.rb -s
# -> Shuffles the colors in the existing sass/colors.scss file
;; OVERLAPPING SETS
;; (overlap-sets '((1 2 3) (4 5 3) (6 7 8 9))) -> ((5 4 1 2 3) (6 7 8 9))
(define (overlap-set-with-sets set sets leftover)
(if (null? sets)
(cons set leftover)
(let ([is (lset-intersection = set (car sets))])
(if (null? is)
(overlap-set-with-sets set (cdr sets) (cons (car sets) leftover))
(overlap-set-with-sets (lset-union = set (car sets)) (cdr sets) leftover)))))
@asivitz
asivitz / snipmate patch
Created January 10, 2012 23:22
Fixes error using 'm' snippet where 'M' is also defined
diff --git a/autoload/snipMate.vim b/autoload/snipMate.vim
index 76fe56b..8f0ebce 100644
--- a/autoload/snipMate.vim
+++ b/autoload/snipMate.vim
@@ -748,7 +748,7 @@ fun! snipMate#GetSnippetsForWordBelowCursor(word, suffix, break_on_first_match)
for [k,snippetD] in items(funcref#Call(s:snipMate['get_snippets'], [snipMate#ScopesByFile(), wor
if a:suffix == ''
" hack: require exact match
- if k != word | continue | endif
+ if k !=# word | continue | endif