Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am solar on github.
  • I am solar_ray (https://keybase.io/solar_ray) on keybase.
  • I have a public key whose fingerprint is 665A 3AAC 802D 1990 FD7B C93F 147A 9EFB 5997 72D9

To claim this, I am signing this object:

@solar
solar / gist:ae81b8e7c845afb863b4
Created January 14, 2016 09:40 — forked from balamaci/gist:42e649ac8e787f9b64dd
start script outputing pid
#!/bin/bash
MYDIR=$(dirname $0)
STATFILE=$MYDIR/command.pid
COMMAND_MARK="myprocess.jar"
MEMORY_OPTIONS="-Xms32m -Xmx256m"
MISC_OPTIONS="-Djava.awt.headless=true"
LOG_FILE=console.log
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("https://insprout.hipchat.com/chat") {
.aui-navgroup-vertical li.aui-nav-heading {
padding-top: 5px;
padding-bottom: 5px;
}
#hipchat .hc-tab a.aui-nav-item {
font-size: 12px;
padding-top: 4px;
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("https://insprout.hipchat.com/chat") {
#tabs > li a.open {
font-size: 11px;
padding: 8px 10px;
}
#tabs > li a.close {
top: 5px;
}
// ==UserScript==
// @name trade_helper
// @namespace sazabi.org
// @include http://*.3gokushi.jp/card/deck.php*
// @version 1
// @require http://zeptojs.com/zepto.min.js
// @require https://raw.githubusercontent.com/madrobby/zepto/master/src/selector.js
// @grant none
// ==/UserScript==
// ==UserScript==
// @name unset_card_from_deck
// @namespace sazabi.org
// @include http://*.3gokushi.jp/card/deck.php*
// @version 1.0
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @grant none
// ==/UserScript==
(function() {
@solar
solar / haproxy.conf
Created November 6, 2012 15:33
install haproxy-dev with supervisord
# Configurations for haproxy
global
maxconn 4096
chroot /var/haproxy
user haproxy
group haproxy
log 127.0.0.1 local0 alert
@solar
solar / install.sh
Created November 5, 2012 16:37
install memcached from source with supervisord
#!/bin/sh
version="1.4.15"
priority="10415"
libevent="/usr/local/libevent/2.0.20-stable/"
supervisordir="/etc/supervisord.d"
# create user
sudo groupadd memcached
sudo useradd -r -g memcached -s /sbin/nologin -M -d /var/run/memcached memcached
@solar
solar / install.sh
Created November 3, 2012 18:23
install nginx from source code with GeoIP module (with supervisord)
#!/usr/local/bin/zsh
# epel
curl -sLO http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-7.noarch.rpm
sudo rpm -ivh epel-release-6-7.noarch.rpm
rm epel-release-6-7.noarch.rpm
# edit /etc/yum.repod.d/epel.repo to set enable=0
# install GeoIP-devel
sudo yum --enablerepo=epel -y install GeoIP-devel
@solar
solar / install.sh
Created October 19, 2012 09:10
install nginx with supervisord
sudo cp ./nginx.repo /etc/yum.repod.d/
sudo yum install nginx
sudo chkconfig nginx off
# add 'daemon off' to /etc/nginx/nginx.conf
sudo cp ./nginx.ini /etc/supervisord.d/
sudo supervisorctl add nginx