Skip to content

Instantly share code, notes, and snippets.

View sharl's full-sized avatar
🐰

Sharl Morlaroll sharl

🐰
View GitHub Profile
@sharl
sharl / gist:1139256
Created August 11, 2011 09:25
cpan2deb speed up test (Web::Scraper)
real 0m19.031s (use locate)
real 0m14.668s (use corelist)
@sharl
sharl / gist:1816742
Created February 13, 2012 12:52
Freetype2 2.4.8 Formula
require 'formula'
class Freetype2 <Formula
url 'http://download.savannah.gnu.org/releases/freetype/freetype-2.4.8.tar.bz2'
homepage 'http://freetype.sourceforge.net/index2.html'
md5 'dbf2caca1d3afd410a29217a9809d397'
version '2.4.8'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
@sharl
sharl / .diagrc
Created March 29, 2012 02:41
~/.*diagrc をこんなふうにまとめてみたいなあ
[global]
fontpath = /usr/share/fonts/truetype/ttf-japanese-gothic.ttf
[blockdiag]
fontpath = /usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
[nwdiag]
fontpath = /usr/share/fonts/truetype/takao/TakaoGothic.ttf
@sharl
sharl / gist:2299606
Created April 4, 2012 08:03
haruchan!
#!/usr/bin/perl
use strict;
use POSIX qw(strftime);
use LWP::UserAgent;
use Data::Dumper;
my $save_dir = $ENV{HOME} . '/Dropbox/haruchan/';
my $TARGET = 'http://cgi2.nhk.or.jp/nw9/haruchan/saijiki/index.cgi?entry=%Y%m%d';
my $HARUCHAN = 'http://cgi2.nhk.or.jp/nw9/data/saijiki/images/%Y%m%d_pg7.jpg';
$ mkdir hoehoe-1.0
$ tar czf hoehoe_1.0.orig.tar.gz hoehoe-1.0
$ cd hoehoe-1.0
$ dh_make -s -c gpl -f ../hoehoe_1.0.orig.tar.gz
$ debuild -uc -us
(snip)
W: hoehoe source: ancient-standards-version 3.8.3 (current is 3.9.1)
E: じゃないのですが、気になるです。
@sharl
sharl / Net-SSL-ExpireDate_TLS.diff
Created June 4, 2012 05:32
Net::SSL::ExpireDate TLS patch
--- Net-SSL-ExpireDate-1.10/lib/Net/SSL/ExpireDate.pm 2011-03-16 13:01:58.000000000 +0900
+++ Net-SSL-ExpireDate-1.10_01/lib/Net/SSL/ExpireDate.pm 2012-06-04 14:17:21.000000000 +0900
@@ -4,7 +4,7 @@
use warnings;
use Carp;
-our $VERSION = '1.10';
+our $VERSION = '1.10_01';
use base qw(Class::Accessor);
@sharl
sharl / php5.4.7_pear_Auth_RADIUS
Created October 11, 2012 04:57
PHP5.4.7/pear install Auth_RADIUS problem
# see https://bugs.php.net/bug.php?id=61983
### START HERE
pecl download radius
tar xf radius-1.2.5.tgz
cp package.xml radius-1.2.5
sed -ie 's/^function_entry radius_functions/static zend_function_entry radius_functions/' radius-1.2.5/radius.c
(cd radius-1.2.5; pecl package)
mv -f radius-1.2.5/radius-1.2.5.tgz .
pecl install radius-1.2.5.tgz
@sharl
sharl / gist:3897087
Created October 16, 2012 03:21
get twitter list members sample
my $tw = Net::Twitter::Lite->new(%consumer_tokens);
$tw->access_token($access_token);
$tw->access_token_secret($access_token_secret);
my ($screen_name, $list_name) = split(/\//, $ARGV[0], 2);
usage if (!$screen_name or !$list_name);
my $cursor = -1;
while ($cursor) {
my $members = $tw->list_members({owner_screen_name => $screen_name,
@sharl
sharl / gist:3897089
Created October 16, 2012 03:23
report spam from user id list sample
my %blocked_users;
map { $blocked_users{$_}++ } @{$tw->blocking_ids};
my @users = map { chomp; $_ } <STDIN>;
for my $user (@users) {
if (! $blocked_users{$user}) {
eval { $tw->report_spam({user_id => $user}) };
}
}
--- rules 2012-10-23 21:49:25.774653298 +0900
+++ rules.20121023-2345 2012-10-23 23:45:03.172139477 +0900
@@ -100,8 +100,12 @@
2.当社は、comm会員記述情報が本規約に違反する場合、その他の当社が不適当と判断した場合には、comm会員記述情報を削除することができるものとします。
</div><!-- /textWrap02 -->
<div class="textWrap02">
- 3.当社は、すべてのcomm会員記述情報を無償で複製その他あらゆる方法により利用し、また、第三者に利用させることができるものとします。
+ 3.当社は、すべてのcomm会員記述情報を本サービスの提供を目的とする範囲において無償で複製その他の方法により利用できるものとします。ただし、comm会員間でメール・チャットによりやりとりされる情報を、令状等による場合を除き、当社、第三者が閲覧することはありません。
</div><!-- /textWrap02 -->
+