Skip to content

Instantly share code, notes, and snippets.

@patricksuo
patricksuo / poorman_tag.c
Created December 15, 2015 13:54
poorman_tag
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <dirent.h>
#include <clang-c/Index.h>
#define ERR(msg) fprintf(stderr, "[%s] [%s] at %s line %d\n", msg, strerror(errno), __FILE__, __LINE__)
//#define DEBUG(msg) fprintf(stderr, "[DEBUG] file %s line %d : %s", __FILE__, __LINE__, msg)
@patricksuo
patricksuo / print.go
Last active August 29, 2015 14:06
utils
package utils
import (
"fmt"
"reflect"
)
func SmartPrint(data interface{}) {
indent := "\t"
var printer func(reflect.Value, int)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon