Skip to content

Instantly share code, notes, and snippets.

Tatsuru WATANABE tatsuru

Block or report user

Report or block tatsuru

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
@tatsuru
tatsuru / dot.notify_tumblr.yaml
Created Jul 17, 2011
Tumblr Desktop Notification with libnotify
View dot.notify_tumblr.yaml
cache:
directory: /home/tatsuru/.tumblr-cache
max: 1000
dashboard:
limit: 10
check_interval: 30
notify_timeout: 30
text_length: 100
@tatsuru
tatsuru / split_gif.rb
Created Jul 20, 2011
Generate divided gif animation for Thumblr
View split_gif.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'RMagick'
def split(src, n)
width = src.columns
height = src.rows
crop_list = []
@tatsuru
tatsuru / count_tumblr.rb
Created Aug 29, 2011
count tumblr posts/day
View count_tumblr.rb
#!/usr/bin/env ruby
require 'tumblife'
require 'yaml'
if ARGV.length < 2
puts "Usage: count_tumblr.rb blogname outfile [limit]"
exit 0
end
View shift.c
gcc -O3 -S shift.c
@tatsuru
tatsuru / glog.pl
Created Jun 2, 2012
weechat global log plugin
View glog.pl
# Weechat plugin
use strict;
use warnings;
my %options = (
buffer => "glog",
logger => "",
exclude => "",
);
@tatsuru
tatsuru / gist:3296314
Created Aug 8, 2012 — forked from onishi/gist:1630307
Media queries for Hatena Group
View gist:3296314
@media screen and (max-device-width: 480px) {
* {
font-size: 48px;
line-height: 64px;
word-break: break-all;
}
table#banner, div#simple-header, div.sidebar, div.caption {
display:none
}
img.hatena-star-comment-button, img.hatena-star-add-button, img.hatena-star-star {
View dante.conf
resolveprotocol: fake
route {
from: 0.0.0.0/0 to: 0.0.0.0/0 via: 127.0.0.1 port = 1080
protocol: tcp udp
proxyprotocol: socks_v5 socks_v4
method: none
}
View ssh.rb
Net::SSH.start(
ip_address, "wtatsuru"
) do |session|
session.open_channel do |channel|
channel.request_pty do |ch, success|
raise "pty" unless success
end
channel.exec("sync") do |ch, success|
ch.on_data do |c, data| puts data end
end
View .rpmmacros
%_builddir ~/rpms/BUILD
%_smp_mflags -j4
%dist centos5
%_topdir ~/rpms
%debug_package %{nil}
%optflags x86_64 -O2 -fomit-frame-pointer -pipe
@tatsuru
tatsuru / Makefile
Created Oct 3, 2012
line to add to recent mysql Makefile when creating sandbox
View Makefile
MYSQL_NO_DASH_VERSION = 5.6.7
You can’t perform that action at this time.