Skip to content

Instantly share code, notes, and snippets.

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
creationTimestamp: "2017-02-18T01:19:04Z"
name: cluster.ligprodkube.com
spec:
@dsapala
dsapala / 00_destructuring.md
Created September 2, 2016 14:11 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

### Keybase proof
I hereby claim:
* I am dsapala on github.
* I am dsapala (https://keybase.io/dsapala) on keybase.
* I have a public key whose fingerprint is C79E 25C8 9B58 43AD 6DA6 4354 244B 24E1 A250 4ABB
To claim this, I am signing this object:
@dsapala
dsapala / index.html
Created March 25, 2016 22:17 — forked from jazzido/index.html
Webcam barcode reading (zbar, emscripten)
<!DOCTYPE html>
<html>
<head>
<title>JS in-browser barcode reader</title>
<style type="text/css">
body > div {
position: relative;
width: 320px; height: 240px;
}
video { position: absolute; top: 0; left: 0; width: 320px; height: 240px; }
@dsapala
dsapala / gist:9943408
Created April 2, 2014 21:19
binding ns
(binding [*ns* 'migrator.db.old-entities]
(let [db (get-connection (:old-db system))]
(defentity user
(database db)
(table "user")
(entity-fields :id :email :first_name :last_name))))
@dsapala
dsapala / namespace.coffee
Created April 6, 2012 11:02
namespaces on coffeescript
#
# http://stackoverflow.com/questions/8730859/classes-within-coffeescript-namespace
# from https://github.com/jashkenas/coffee-script/wiki/FAQ
# Code:
#
namespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
@dsapala
dsapala / hack.sh
Created April 1, 2012 20:35 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@dsapala
dsapala / gist:2276778
Created April 1, 2012 16:25
gcc -v output
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
This file has been truncated, but you can view the full file.
==> Downloading http://www.php.net/get/php-5.3.10.tar.bz2/from/this/mirror
Already downloaded: /Users/dsapala/Library/Caches/Homebrew/php-5.3.10
/usr/bin/tar xf /Users/dsapala/Library/Caches/Homebrew/php-5.3.10
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file ext/tidy/tidy.c
==> ./configure --prefix=/usr/local/Cellar/php/5.3.10 --disable-debug --with-config-file-path=/usr/local/etc --with-config-file-scan-dir=/usr/local/etc/php5/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-sqlite-utf8 --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-zend-multibyte --enable-bcmath --enable-calendar --with-openssl=/usr --with-zlib=/usr --with-bz2=/usr --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-libxml-dir=/usr/local/Cellar/libxml2/2.7.8 --with-xsl=/usr --with-curl=/usr --with-gd --enable-gd-nati
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/usr/local/rvm/gems/ruby-1.9.2-p180@global/bin/passenger-config