Skip to content

Instantly share code, notes, and snippets.

@ZaneA
ZaneA / Makefile
Created December 16, 2012 08:42
An LD_PRELOAD hack to create an OpenGL overlay.
overlay : main.c
gcc -o liboverlay.so -shared -fPIC main.c -lGL -I/usr/include/freetype2 -lftgl
@ZaneA
ZaneA / .ycm_extra_conf.py
Created February 6, 2013 03:25
.ycm_extra_conf.py for a project that has an existing .clang_complete
# Specify compiler flags for the YouCompleteMe plugin in Vim.
def FlagsForFile(filename):
return {
'flags': open('.clang_complete', 'r').readlines(),
'do_cache': True
}
@ZaneA
ZaneA / simple-mode-line.el
Last active December 16, 2015 05:48 — forked from lateau/simple-mode-line.el
Remove some warnings.
;;; simple-mode-line.el --- Simplified Mode Line for Emacs 24
;; Author: Daehyub Kim <lateau at gmail.com>
;; URL: https://gist.github.com/4511988
;; Version: 0.1
;; Keywords: mode-line, color
;;; Commentary:
;; This simplified mode line is adjusted to *white* themes.
@ZaneA
ZaneA / filters.js
Created June 6, 2013 06:55
A couple of filters for AngularJS.
app.filter('escape', function () {
return function (text) {
if (!text) return '';
return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
};
});
app.filter('linkify', function () {
var domainRegexp = /(https?|ftp):\/\/(.*)/;
@ZaneA
ZaneA / git-mpush
Last active December 20, 2015 01:09
Usage: `git mpush origin,github master`
#!/bin/bash
IFS=',' read -ra REMOTES <<< "$1"
shift
for REMOTE in "${REMOTES[@]}"; do
echo git push $REMOTE $*
git push $REMOTE $*
done

Keybase proof

I hereby claim:

  • I am zanea on github.
  • I am zanea (https://keybase.io/zanea) on keybase.
  • I have a public key whose fingerprint is D8B5 59D4 FC8E A187 6445 E156 D4F7 0856 356B F1B1

To claim this, I am signing this object:

@ZaneA
ZaneA / gist:0404067e1b2a0fc6161d
Created June 12, 2015 02:49
Saving events into InfluxDB(?) to be rendered with Grafana(?)
#!/bin/sh
curl -X POST -d '[{"name": "events", "columns": ["title", "tags", "text"], "points": [["Title", "one|two", "Text"]]}]' 'http://localhost:8086/db/events/series?u=admin&p=admin'