Skip to content

Instantly share code, notes, and snippets.

goncha / about-filter
Created Jul 12, 2013
cgit's about-filter, to render text file with line breaks
View about-filter
#!/usr/bin/env perl
print "<pre>\n";
while (<STDIN>) { print; }
print "</pre>\n";
goncha / cjk-latex.tex
Last active Dec 16, 2015
Latex in Chinese
View cjk-latex.tex
\end{CJK*} (this is a test)
goncha / jquery-flot.html
Last active Dec 16, 2015
jQuery Flot query Graphite data
View jquery-flot.html
<!DOCTYPE html>
<meta charset="utf-8"></meta>
<title>Graphite Flot Example</title>
<style type="text/css">
#graphite {
width: 300px;
height: 200px;
font-size: 14px;
goncha / git-proxy.txt
Last active Jan 20, 2020
Git and socks5 proxy
View git-proxy.txt
gang@debian:~$ sudo apt-get install netcat-openbsd
gang@debian:~$ cat /usr/local/bin/git-proxy-wrapper
nc -xlocalhost:1080 -X5 $*
gang@debian:~$ export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy-wrapper
goncha / curl-socks5.txt
Last active Dec 11, 2015
curl socks5 proxy
View curl-socks5.txt
root@devops3:~# cat .curlrc
socks5-hostname = localhost
socks5 = localhost
goncha / haproxy.cfg
Created Jan 11, 2013
Haproxy and syslog sample
View haproxy.cfg
log /dev/log local0 info
#log loghost local0 info
maxconn 1024
#chroot /home/app/var/haproxy
user app
group users
pidfile /home/app/var/
stats socket /home/app/var/haproxy.sock
goncha /
Created Nov 15, 2012 — forked from bkjones/
Fork from bkjones, nagios command to send graphite graph by email
#!/usr/bin/env python
This takes a recipient email address and a graphite URL and sends a
POST to <graphite host>/dashboard/email with a body that looks like
...which will cause the graphite installation to send an email.
goncha / gist:4037341
Created Nov 8, 2012
BASH script to control tomcat instance on customized CATALINA_BASE with CATALINA_PID
View gist:4037341
usage () {
echo "Usage: $0 <startup|shutdown>"
exit 1
if [ $# -lt 1 ]
goncha / gist:4016202
Created Nov 5, 2012
build.gradel for simple Java webapp
View gist:4016202
apply plugin: "war"
apply plugin: "eclipse"
apply plugin: "jetty"
repositories {
// mavenCentral()
maven {
url ""
goncha / jetty6.xml
Last active Feb 16, 2017
jetty.xml to add a single context
View jetty6.xml
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "">
<Configure id="Server" class="org.mortbay.jetty.Server">
<Set name="ThreadPool">
<New class="org.mortbay.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">200</Set>
<Set name="lowThreads">20</Set>