Skip to content

Instantly share code, notes, and snippets.

@Olivia5k
Olivia5k / json.go
Created November 3, 2015 08:54
Example for handling JSON lists with double numerical types
package main
import (
"encoding/json"
"fmt"
)
// JSONDemo is a demo
type JSONDemo struct {
Foo [][2]float64 `json:"foo"`
@Olivia5k
Olivia5k / gist:6339050
Created August 26, 2013 08:03
My luftwaffe conf
#!/bin/bash
# this is a simple config for herbstluftwm
function hc() {
herbstclient "$@"
}
hc emit_hook reload
@Olivia5k
Olivia5k / gist:2366916
Created April 12, 2012 12:29
jQuery Autocomplete custom _renderItem issue
I am having issues with jQuery Autocomplete. I am modding it to
show two kinds of items: actual matches to the search string and
suggestions (speling corrections, related keywords etc). The
backend does all the work on that; the Autocomplete is just
fed two lists.
A picture can explain better:
http://shot.ninjaloot.se/20120412.141112.png
(the data is just rasta dummy data while developing, and the
@Olivia5k
Olivia5k / gist:1606292
Created January 13, 2012 13:42
nginx maintenance configuration error
# This is the relevant configuration block. More can be supplied if needed.
location / {
try_files /srv/maintenance.html @site;
}
location @site {
# The site-apache upstream is defined and was working before this. Full config could be supplied if needed.
proxy_pass http://site-apache/;
}
@Olivia5k
Olivia5k / XBMC config data
Created December 5, 2011 19:10
spotyxbmc2 compile error
------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes