Skip to content

Instantly share code, notes, and snippets.

View blissdev's full-sized avatar

Jordan Arentsen blissdev

View GitHub Profile
@blissdev
blissdev / error.txt
Created August 26, 2014 02:36
omelette `lein demo` error
Web server running on port 62635
Mon Aug 25 21:29:46 CDT 2014 [worker-1] ERROR - GET /
javax.script.ScriptException: TypeError: Cannot get property "value" of null in <eval> at line number 52121
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:586)
at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:511)
at jdk.nashorn.api.scripting.NashornScriptEngine.invokeMethod(NashornScriptEngine.java:236)
at omelette.render$render_fn_STAR_$render_to_string__11629.invoke(render.clj:21)
at omelette.render$render_fn_STAR_$render__11631.invoke(render.clj:38)
at omelette.render$render_fn$render__11670.invoke(render.clj:55)
at omelette.route$wildcard_ring_route$fn__11733.invoke(route.clj:163)
@blissdev
blissdev / gist:ead0982d6009cf6eb9d9
Created July 11, 2014 05:10
light command error after running `light server.js`
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname path
2014-07-11 00:08:12.366 node-webkit[20895:507] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
LSOpenURLsWithRole() failed for the application /Applications/LightTable/LightTable.app with error -600.
javascript:(function(){var%20visibleTags=$('span.tag:visible');visibleTags.each(function(){var%20tag=$(this);var%20position=tag.position();var%20left=tag.position().left;tag.css({right:'auto',left:left,background:'red',cursor:'pointer'});});visibleTags.draggable({stop:function(e,ui){var%20pos=ui.helper.position();var%20update={id:ui.helper.data('room'),tagXPosition:576-pos.left-ui.helper.outerWidth()-2,tagYPosition:ui.helper.css('top').slice(0,-2)};console.log(update);$.ajax({url:'/d/room/update_batch',type:'post',data:{updates:JSON.stringify([update])}})}});})();
@blissdev
blissdev / reload-haproxy.sh
Created April 9, 2014 06:12
Restart haproxy gracefully
#!/usr/bin/env bash
echo "Gracefully reloading haproxy..."
sudo haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)
echo "[done]"
CREATE OR REPLACE FUNCTION public.rotate()
RETURNS boolean
LANGUAGE plv8
AS $function$
var toDegrees = function toDegrees (angle) {
return angle * (180 / Math.PI);
}
var rooms = plv8.execute(
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu-13.10_vmware.box"
config.vm.box_url = "http://shopify-vagrant.s3.amazonaws.com/ubuntu-13.10_vmware.box"
global
#daemon
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
@blissdev
blissdev / docker_install.yml
Created October 12, 2013 19:57
Install Docker with Ansible
- name: add docker repository key
sudo: yes
shell: curl https://get.docker.io/gpg | apt-key add -
- name: add docker repository
sudo: yes
shell: echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
- name: update apt
apt: update_cache=yes
@blissdev
blissdev / gist:6682094
Created September 24, 2013 08:51
docker commit errors
vagrant@precise64:~$ sudo docker commit ae7b241 blissdev postgres -run='{"Cmd": ["/bin/su", "postgres", "-c", "/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data"], "PortSpecs": ["5432"]}'
unexpected fault address 0x7e12a0
fatal error: fault
[signal 0x7 code=0x2 addr=0x7e12a0 pc=0x464076]
goroutine 1 [running]:
[fp=0x7fbae07e8330] runtime.throw(0x9f9dab)
/usr/local/go/src/pkg/runtime/panic.c:473 +0x67
[fp=0x7fbae07e8348] runtime.sigpanic()
var http = require('http');
http.createServer(function(req, res) {
res.end(process.env.whoami);
}).listen(3000);