Skip to content

Instantly share code, notes, and snippets.

View rossomax's full-sized avatar

まつばら たけし rossomax

View GitHub Profile
AUTO_UPGRADE=yes
AUTO_INSTALL=yes
IGNORE_FILES='/etc/motd'
PRESERVE_FILES=yes
VERBOSE=yes
#DIFF_OPTIONS='-I$FreeBSD:.*[$]'
FREEBSD_ID=yes
@rossomax
rossomax / user.js
Last active December 19, 2015 10:09
user_pref("general.useragent.override.auone.jp", "Mozilla/5.0 (Windows NT 6.3; X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0");
user_pref("general.useragent.override.kddi.com", "Mozilla/5.0 (Windows NT 6.3; X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0");
package main;
import (
"fmt"
)
var memo = [][]int {};
func init() {
memo = make([][]int, 100000);
@rossomax
rossomax / delegated.conf
Last active December 18, 2015 07:39
delegate設定ファイル
ADMIN=takeshi@localdomain
EXPIRE=7d
RELIABLE=".localnet"
SERVER=http
MOUNT="/wpad.dat file:/usr/local/www/apache22/data/wpad.dat"
MOUNT="/proxy.pac file:/usr/local/www/apache22/data/wpad.dat"
LOGFILE='${LOGDIR}/${PORT}[date+.%m%d]'
PROTOLOG='${LOGDIR}/${PORT}.${PROTO}[date+.%m%d]'
ERRORLOG='${LOGDIR}/errors.log[date+.%m%d]'
TRACELOG='${LOGDIR}/ptrace.log[date+.%m%d]'
@rossomax
rossomax / rotatelog.sh
Created June 4, 2012 05:09
rotate log implementation by sh script
#!/bin/sh
# Usage: rotatelog.sh [-zcn] level logfiles...
while getopts zcn flag; do
case $flag in
z) compress="/usr/bin/gzip"; ext=".gz";;
c) compress="/usr/bin/compress"; ext=".Z";;
n) ECHO="echo";
esac
done
@rossomax
rossomax / update-extlinux-cfg.sh
Created May 31, 2012 15:46
Extlinux config file maker for Fedora 17
#!/usr/bin/sh
# vim: sts=4 sw=4
#
# Extlinux config file maker for Fedora 17
#
# Install instruction: (do this by root)
# # yum install extlinux
# # extlinux --install /boot/extlinux
# # sh <THIS SCRIPT> > /boot/extlinux/extlinux.conf
#
@rossomax
rossomax / httpreqdump.py
Created May 30, 2012 15:35
form submit and file upload with ajax
# vim: ts=4 sw=4 fenc=utf-8
import bottle
@bottle.get('<file:re:^.*\.(css|less|js|jpg|png|gif|ttf)>')
def static_file(file):
return bottle.static_file(file, root='./web')
@rossomax
rossomax / testserver.py
Created May 22, 2012 08:57
Asynchronous programming with bottle and gevent
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
# system libraries
import sys
import codecs
# non standard libraries
import bottle
from bottle import get, post
@rossomax
rossomax / zfssnap.py
Created October 15, 2011 21:47
shaving zfs snapshots
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ZFS スナップショットをルールに従ってdestroyします
# Copyright 2011 Takeshi Matsubara ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@rossomax
rossomax / .gitignore
Created June 21, 2011 20:55
my radiotray bookmarks
*~
config.xml