Skip to content

Instantly share code, notes, and snippets.

// ==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() {
// ==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==
@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;
}
@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;
@solar
solar / gist:986348
Created May 23, 2011 07:08
Android grayscale ColroMatrixFilter
// grayscale color filter
float r = 0.298912F;
float g = 0.586611F;
float b = 0.114478F;
ColorMatrixFilter filter = new ColorMatrixFilter(
new ColorMatrix(new float[] {
r, g, b, 0, 0,
r, g, b, 0, 0,
@solar
solar / gist:992703
Created May 26, 2011 07:19
Parse String to Date
SimpleDateFormat format = new SimpleDateFormat("E MMM d kk:mm:ss Z yyyy", Locale.US);
Date datetime = format.parse("Thu Jun 10 01:32:13 +0000 2010");
@solar
solar / boost
Created March 7, 2012 05:12
Building facebook/scribe
# install boost-1.49.0
cd ~/src
curl -L "http://downloads.sourceforge.net/project/boost/boost/1.49.0/boost_1_49_0.tar.gz?r=http%3A%2F%2Fwww.boost.org%2Fusers%2Fhistory%2Fversion_1_49_0.html&ts=1331091084&use_mirror=jaist" | tar zxv
cd boost_1_49_0
./bootstrap.sh
./b2
sudo ./b2 --prefix=/usr/local/boost_1_49_0 install
@solar
solar / gist:3205949
Created July 30, 2012 09:56
Create virtual ip address in linux
# by ifconfig
ifconfig eth1:0 10.1.53.1
ifconfig eth1:0 down
# by iproute2
ip addr add 10.1.53.1 dev eth1
ip addr show
ip addr del 10.1.53.1 dev eth1
@solar
solar / vim73.sh
Created October 12, 2012 05:48
Install vim 7.3
# install vim
curl -L ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar jx
cd vim73
./configure --prefix=/usr/local/vim/7.3 --enable-multibyte --with-features=huge
make
sudo make install
sudo alternatives --install /usr/local/bin/vim vim /usr/local/vim/7.3/bin/vim 070300 \
--slave /usr/local/bin/view view /usr/local/vim/7.3/bin/view
@solar
solar / init.conf
Created October 16, 2012 07:35
install supervisor
description "supervisord"
start on started sshd
stop on runlevel [!2345]
respawn
exec /usr/bin/supervisord -n -c /etc/supervisord.conf