Skip to content

Instantly share code, notes, and snippets.

mix3@サタデーナイトフィーバー mix3

Block or report user

Report or block mix3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Wrapping HTTPURLConnection
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
import java.util.Map.Entry;
import com.google.appengine.repackaged.com.google.common.base.StringUtil;
View vimrc
" vim:set ts=8 sts=2 sw=2 tw=0: (この行に関しては:help modelineを参照)
"
" An example for a Japanese version vimrc file.
" 日本語版のデフォルト設定ファイル(vimrc) - Vim7用試作
"
" Last Change: 24-Jul-2007.
" Maintainer: MURAOKA Taro <koron@tka.att.ne.jp>
"
" 解説:
" このファイルにはVimの起動時に必ず設定される、編集時の挙動に関する設定が書
@mix3
mix3 / symfony_completion_generate.pl
Created Feb 6, 2011
./symfony | perl symfony_competion_generate.pl > /etc/bash_completion.d/symfony
View symfony_completion_generate.pl
#!/usr/bin/perl
use strict;
use warnings;
my ($first, @cmd);
while ( <> ) {
if ( /^([a-zA-Z0-9\-]+)/ ) {
$first = $1;
} elsif ( /^\s*(:[a-zA-Z0-9\-]+)/ ) {
@mix3
mix3 / generate_app.pl
Created Feb 8, 2011
Ark skeletone project generater
View generate_app.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Cwd;
use Data::Section::Simple qw/get_data_section/;
if($#ARGV < 0){
@mix3
mix3 / autopagerize.user.js
Created Feb 13, 2011
pixiv用autopagerize設定
View autopagerize.user.js
var SITEINFO = [
{
url: 'http://www.pixiv.net/member_illust.php\\?mode=medium&illust_id=',
nextLink: '//div[@class="centeredNavi"]/ul/li/a[contains(text(),"≫")]',
pageElement: '//div[@class="two_column_body"]',
},
]
@mix3
mix3 / cassandra_thrift_perl_sample.pl
Created Mar 15, 2011
Accessing Cassandra 0.7.0 from Perl
View cassandra_thrift_perl_sample.pl
#!/usr/bin/env perl
use strict;
use warnings;
use lib $ENV{'CASSANDRA_HOME'}.'/interface/gen-perl/';
use Cassandra::Cassandra;
use Cassandra::Constants;
use Cassandra::Types;
@mix3
mix3 / insert_or_update.pl
Created Mar 15, 2011
Accessing Cassandra 0.7.0 from Perl
View insert_or_update.pl
#!/usr/bin/env perl
use strict;
use warnings;
use lib $ENV{'CASSANDRA_HOME'}.'/interface/gen-perl/';
use Cassandra::Cassandra;
use Cassandra::Constants;
use Cassandra::Types;
@mix3
mix3 / gist:879419
Created Mar 21, 2011
useしてるものを取り出してみる
View gist:879419
grep use lib/ -h -r | perl -e '%hash; while(<>){if(/use (\w+(::)?)+/){if($& =~ /use (.+)/){$hash{$1}++}}}; foreach(keys %hash){print $_."\n"}' | egrep -v 'strict|warnings|base' | xargs
@mix3
mix3 / while_show_slave_status.sh
Created Apr 6, 2011
MySQLのSlaveの遅延をチェック 遅延発生で赤色に
View while_show_slave_status.sh
#!/bin/sh
color() {
printf '\033[%sm%s\033[m\n' "$@"
}
while true
do
DATE=`date | sed -e 's/\r\n/\n/g' | sed -e 's/\n//g'`
SBM=`echo "show slave status\G" | mysql -u root | grep Seconds | sed -e 's/ Seconds_Behind_Master: //g'`
View commentout.vim
" lhs comments
vmap ,# :s/^/#/<CR>:nohlsearch<CR>
vmap ,/ :s/^/\/\//<CR>:nohlsearch<CR>
vmap ,> :s/^/> /<CR>:nohlsearch<CR>
vmap ," :s/^/\"/<CR>:nohlsearch<CR>
vmap ,% :s/^/%/<CR>:nohlsearch<CR>
vmap ,! :s/^/!/<CR>:nohlsearch<CR>
vmap ,; :s/^/;/<CR>:nohlsearch<CR>
vmap ,- :s/^/--/<CR>:nohlsearch<CR>
vmap ,c :s/^\/\/\\|^--\\|^> \\|^[#"%!;]//<CR>:nohlsearch<CR>
You can’t perform that action at this time.