Skip to content

Instantly share code, notes, and snippets.

View a13xb's full-sized avatar

Alexander Bolodurin a13xb

  • Sydney, Australia
View GitHub Profile
@a13xb
a13xb / Podfile
Created January 11, 2016 12:21
Quick workaround for per-target asset catalog compilation using a Podfile post_install hook
# ...
# Workaround for https://github.com/CocoaPods/CocoaPods/issues/1546
post_install do |installer|
installer.aggregate_targets.each do |at|
files = at.user_targets.map{|t|
t.resources_build_phase.files_references.select{|f|
f.last_known_file_type == 'folder.assetcatalog'
}.map{|f|
Pathname.new(f.real_path).relative_path_from(f.project.path.dirname)
@a13xb
a13xb / valuer.go
Last active August 29, 2015 14:25
Dilemma: a type can only implement driver.Valuer for value or pointer (not both)
package main
import (
"database/sql"
"database/sql/driver"
_ "github.com/lib/pq"
"log"
)
func E(err error) {

Keybase proof

I hereby claim:

  • I am a13xb on github.
  • I am a13xb (https://keybase.io/a13xb) on keybase.
  • I have a public key whose fingerprint is B748 075F 70FC A93A B967 4BAB DE21 E2B2 9F9C AE82

To claim this, I am signing this object:

@a13xb
a13xb / quickeval.vim
Created June 27, 2013 02:21
Quickly evaluate C and Python code in the current buffer (Shift + Enter).
let s:buf_nr = -1
function! EvalView()
if !bufexists(s:buf_nr)
leftabove vnew
file `="[Eval]"`
let s:buf_nr = bufnr('%')
elseif bufwinnr(s:buf_nr) == -1
leftabove vsplit
exe s:buf_nr . 'buffer'
@a13xb
a13xb / conflict.sh
Created October 25, 2012 13:40
Conflict example
#! /bin/sh
set -e
couch() {
cmd="curl localhost:5984/"
echo '===' ${cmd}$*
${cmd}$*
echo
}