Skip to content

Instantly share code, notes, and snippets.

View delphinus's full-sized avatar

JINNOUCHI Yasushi delphinus

View GitHub Profile
@delphinus
delphinus / gist:2026765
Created March 13, 2012 04:31
[Stylish] gmail setting
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("mail.google.com") {
/* メールを等幅フォントで表示 */
div[class^="ii gt"],div[class^="ii gt"] * {
font-family:"Ricty Discord",monospace!important;
/*font-size:10pt!important;*/
}
textarea {
/*font-size:9pt!important;*/
@delphinus
delphinus / gist:2342373
Created April 9, 2012 08:47
script copile test
use Test::More;
use Capture::Tiny qw!capture!;
plan tests => 2;
my $script = 'test.pl';
my ($stdout, $stderr, undef) = capture {
system "perl -c $script";
};
is $stdout => '', "$script compile output none to STDOUT.";
is $stderr => <<ERR, "$script compile output true message to STDERR.";
$script syntax OK
@delphinus
delphinus / gist:2427348
Created April 20, 2012 09:34
[Stylish] default setting
@font-face {
font-family: "MS Pゴシック";
src: local("Meiryo mod 12pt AA"), local("メイリオ"), local("Meiryo"), local("MS Pゴシック");
}
@font-face {
font-family: "MS PGothic";
src: local("Meiryo mod 12pt AA"), local("メイリオ"), local("Meiryo"), local("MS Pゴシック");
}
@font-face {
font-family: "MS ゴシック";
@delphinus
delphinus / gist:2566630
Created May 1, 2012 09:11
改行コード統一
perl -i -pe 's/\x0D\x0A/\n/g;tr/\r/\n/' filename
@delphinus
delphinus / pod.sh
Created July 24, 2012 08:43
read POD in Perl code written in euc-jp
#!/bin/sh
usage_exit() {
echo "Usage: $0 [--from-code,-f FROM] [--to-code,-t TO] [--help,-h] file" 1>&2
exit 1
}
# default values
FROM=EUC-JP
TO=UTF-8
@delphinus
delphinus / gist:3205577
Created July 30, 2012 07:57
CentOS5 で https から git clone できなかったときの対処法
git config --global http.sslcainfo /etc/pki/tls/cert.pem
@delphinus
delphinus / gist:3232620
Created August 2, 2012 02:25
git rm for non-existent files
for i in `git status -sb | grep -v ^## | cut -d' ' -f3`; do [ -e $i ] || git rm $i; done
@delphinus
delphinus / gist:3279943
Created August 7, 2012 00:28
clang compile
clang -Wall -fobjc-arc -framework Foundation -o exsample exsample.m
@delphinus
delphinus / gist:3697354
Created September 11, 2012 10:01
get count of rows in MySQL
SELECT SQL_CALC_FOUND_ROWS id, name FROM address LIMIT 10, 30;
SELECT FOUND_ROWS();
@delphinus
delphinus / gist:3697356
Created September 11, 2012 10:02
Woopra API sample
#!/usr/bin/env perl
use strict;
use warnings;
use Date::Manip;
use LWP::Simple;
use JSON;
use YAML;
use URI;
my $uri = URI->new('http://api.woopra.com/rest/analytics/get.jsp');