天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。
- gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
#!/usr/bin/env sh | |
if ! which md5sum > /dev/null; then | |
echo Install md5sum | |
exit 1 | |
fi | |
if ! which curl > /dev/null; then | |
echo Install curl | |
exit 1 |
<!-- | |
1. Download the Android Jelly Bean fonts and the Symbola font: | |
https://www.dropbox.com/s/tvtzcnzkvbe0nrt/jelly-bean-fonts.zip | |
http://users.teilar.gr/~g1951d/Symbola707.zip | |
2. unzip the files and put AndroidEmoji.ttf and Symbola.ttf (and any of the other fonts that strike your fancy) | |
in your ~/.fonts/ directory | |
3. run `fc-cache -f`. You can check to make sure the new fonts | |
were installed with `fc-list`. You'll probably want to grep the copious output for Symbola or Emoji |
#!/usr/bin/env ruby | |
Dir.glob("#{ENV['HOME']}/works/**").each do |dir| | |
next unless File.exists?("#{File.expand_path(File.join(dir, '.git'))}") | |
Dir.chdir(dir) do | |
system("nippo.rb") | |
end | |
end |
task :server_list do | |
roles.each do|name, role| | |
role.each do|server| | |
puts "%10s %13s %s" % [name, server, server.options.inspect] | |
end | |
end | |
end |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use YAML::Syck; | |
use TokyoCabinet; | |
use Text::KyTea; | |
use Unicode::Japanese; |
// ==UserScript== | |
// @name delete kindle item | |
// @namespace [email protected] | |
// @include https://www.amazon.com/gp/digital/fiona/manage* | |
// @include https://www.amazon.co.jp/gp/digital/fiona/manage* | |
// @version 1 | |
// ==/UserScript== | |
jQuery('<button id="delete_all_item" style="margin-left:10px;">delete all</button>').insertAfter('#searchTextGoButton'); |
# usage: ruby ikoma.rb | pbcopy | |
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri::HTML(open("http://d.hatena.ne.jp/mamoruk/archive?word=&of=#{rand(1550)}", :proxy => nil).read) | |
entries = (doc/'li.archive.archive-section'/'a'); elem = entries[rand(entries.size)] | |
puts "#{elem.inner_text} #{elem.attribute('href').value}" |
#!/usr/bin/env ruby | |
# -*- coding: utf-8; ruby -*- | |
# http://d.hatena.ne.jp/okinaka/20111010/1318211550 | |
require 'shellwords' | |
def main | |
old = File.expand_path(ARGV[0]) | |
new = File.expand_path(ARGV[1]) | |
branch_name = Time.now.to_i.to_s |
function! s:search(name) | |
return map(filter(webapi#json#decode(webapi#http#get(printf('https://api.github.com/legacy/repos/search/%s', a:name)).content).repositories, 'v:val.name==a:name'), 'v:val.username ."/". v:val.name') | |
endfunction | |
echo s:search('gist-vim') |