Skip to content

Instantly share code, notes, and snippets.

View hsbt's full-sized avatar
Working from home

Hiroshi SHIBATA hsbt

Working from home
View GitHub Profile
hsbt / git-coauthor
Last active January 25, 2024 07:02 — forked from pocke/git-coauthor
Add GitHub's Co-authored-by to the latest commit from account name
View git-coauthor
#!/usr/bin/env bash
USAGE="Usage: git coauthor USERNAME
It adds the specified user as Co-authored-by into the latest commit.
$ git coauthor pocke"
View img_convert.rb
#!/usr/bin/env ruby
require "nokogiri"
require 'pry'
require 'htmlentities'
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls
# example usage:
# ruby convert.rb ~/my_rails_app/app/views
View 2013RubyKaigiのもやもや問題を自分なりに整理
一つはKaigi中での、「台湾の女の子はKawaii、だからRubyKaigi Taiwanに来るべき」という発言、
View solr-3.6.0-kuromoji-schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<schema name="sunspot" version="1.0">
<!-- Scalar field types -->
<fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
<fieldType name="date" class="solr.DateField" omitNorms="true"/>
<fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField" omitNorms="true"/>
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
use Encode;
hsbt / gist:1937272
Created February 29, 2012 03:10 — forked from defunkt/gist:162535
View gist:1937272
desc "Shrink the js"
task :minimize_js, :roles => :app, :except => { :no_release => true } do
require 'lib/js_minimizer'
paths = []
paths += Dir['public/javascripts/jquery.*.js'].sort
paths += Dir['public/javascripts/github.*.js'].sort
paths = paths.flatten
put JSMinimizer.minimize_files(*paths), "#{release_path}/public/javascripts/bundle.js"
hsbt / coderwall_badge_markup.html
Created February 28, 2012 03:27 — forked from bguthrie/coderwall_badge_markup.html
An example of Coderwall badge integration.
View coderwall_badge_markup.html
<!-- Add these tags to the HEAD section of your page. -->
<link href="" media="all" rel="stylesheet" type="text/css">
<script src=""></script>
<!-- You also need to place a container where you'd like the Coderwall badges to render. -->
<section class="coderwall" data-coderwall-username="(your username)" data-coderwall-orientation="(vertical or horizontal)"></section>
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
View screen-mac-pbcopy.patch
--- a/mark.c 2009-06-25 02:03:01.000000000 +0900
+++ b/mark.c 2009-06-25 02:03:50.000000000 +0900
@@ -59,6 +59,8 @@
static void MarkRedisplayLine __P((int, int, int, int));
static int MarkRewrite __P((int, int, int, struct mchar *, int));
+void pbcopy(const char *strings);
extern struct layer *flayer;
extern struct display *display, *displays;