Skip to content

Instantly share code, notes, and snippets.

View brianjriddle's full-sized avatar

Brian Riddle brianjriddle

View GitHub Profile
@ghostganz
ghostganz / gist:1589361
Created January 10, 2012 14:33
Widening a PNG sprite on three places
require 'chunky_png'
original = ChunkyPNG::Image.from_file "original.png"
target = ChunkyPNG::Image.new(original.width + (355 * 3), original.height)
break_columns = [100, 310 + 100, 620 + 100]
target_x = 0
(0...original.width).each do |x|
@richhickey
richhickey / thread.clj
Created October 13, 2012 17:43
new thread macros draft
(defmacro test->
"Takes an expression and a set of test/form pairs. Threads expr (via ->)
through each form for which the corresponding test expression (not threaded) is true."
[expr
& clauses]
(assert (even? (count clauses)))
(let [g (gensym)
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))]
`(let [~g ~expr
~@(interleave (repeat g) (map pstep (partition 2 clauses)))]
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
@WildDogOne
WildDogOne / gist:425e7ba7791593f564da
Last active December 28, 2016 08:24
Install PBIS on Ubuntu 15.04
1. download powerbroker frome here http://download1.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True
2. sudo chmod a+x {filename}
sudo ./pibsfilename.sh
3. sudo domainjoin-cli join --disable ssh contoso.local administrator@contoso.local
4. sudo vim /etc/pam.d/common-session
add: "session [success=ok default=ignore] pam_lsass.so"