Skip to content

Instantly share code, notes, and snippets.

@codekoala
codekoala / hi.go
Created July 10, 2014 04:49
Platform-specific code for Go. Simply run "go build" and run the resulting executable.
package main
func main() {
hiForPlatform()
}
@codekoala
codekoala / 0_reuse_code.js
Created July 7, 2014 05:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@codekoala
codekoala / gist:82d1d09c28bb3ba554bd
Created May 7, 2014 18:53
Clean up orphaned docker images
docker rmi -f $(docker images | awk '/<none>/ {print $3}')
@codekoala
codekoala / updatedns.py
Last active August 29, 2015 13:57
This (python 3) script can be used with Rackspace's DNS servers to point a particular domain's DNS records to the public IP address of the system which invokes the script.
#!/usr/bin/env python
"""
:mod:`updatedns` --- Update External DNS
========================================
.. author:: Josh VanderLinden <codekoala@gmail.com>
.. date:: 18 Mar 2014
This script will attempt to update the Rackspace DNS records for a specific
glu.defModel('helloworld.nav', {
treestore: {
mtype: 'treestore',
proxy: {
type: 'ajax',
url: 'nav.json',
reader: {
type: 'json'
}
}
@codekoala
codekoala / 1-norm_my.csv
Last active December 26, 2015 11:39
Stats from my simple RethinkDB vs PostgreSQL benchmarks. The tests are quite simple. I have an API layer with basic models to represent what kind of data each table should hold. Tables are generated automatically based on the models when the API is launched. The following information is tracked while the test is running. * size on disk in bytes …
0.0 143107.0 0.69 1.07 1.21 2.0 152.0 30207.0
@codekoala
codekoala / gist:7030625
Created October 17, 2013 19:17
Build error for RethinkDB 1.10.0 with icu 52.1-1 on Arch Linux
[125/281] CC src/rdb_protocol/term.cc -o build/release/obj/rdb_protocol/term.o
In file included from src/extproc/js_job.cc:10:0:
/usr/include/v8.h: In constructor ‘js_context_t::js_context_t()’:
/usr/include/v8.h:764:3: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
V8_INLINE(Persistent(const Persistent& that)) : val_(that.val_) {}
^
src/extproc/js_job.cc:59:22: error: within this context
scope(context) { }
^
src/extproc/js_job.cc:59:22: error: no matching function for call to ‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
@codekoala
codekoala / PKGBUILD
Last active December 17, 2015 15:08
Customized PKGBUILD for btsync with user-specific profiles
# Maintainer: Dongsheng Cai <http://dongsheng.org>
# Maintainer: ava1ar < mail(at)ava1ar(dot)info >
pkgname=btsync
pkgver=1.0.134
pkgrel=4
pkgdesc="Automatically sync files via secure, distributed technology"
license=("custom")
arch=('i686' 'x86_64')
url="http://labs.bittorrent.com/experiments/sync.html"
@codekoala
codekoala / config
Created March 5, 2013 19:03
my i3 configs
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@codekoala
codekoala / rethinklog.py
Last active December 12, 2015 06:59
Unfinished weechat plugin to automatically log messages to a RethinkDB server.
"""
RethinkLog - Log messages to a rethinkdb instance.
Copyright (C) 2013 Josh VanderLinden <arch@cloudlery.com>
Date: 2013-02-07
Version: 0.0.2
* 0.0.2 - 2013-02-07: bulk inserts; disconnect from rethinkdb
* 0.0.1 - 2013-02-07: initial plugin