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
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.
Example:
$ git coauthor pocke"
View transactive-memory.md
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のもやもや問題を自分なりに整理
みなさまRubyKaigiお疲れ様でしたー。素敵なKaigiに再会できてうれしかったです。
RubyKaigiまわりで、同じ分野の問題提起が二つありましたねぇ。
一つはKaigi中での、「台湾の女の子はKawaii、だからRubyKaigi Taiwanに来るべき」という発言、
それを笑いで迎えた場内に対して、女性への配慮が足りないだろうという意見。
https://gist.github.com/kyanny/5694201
もう一つは、続くRubyHirobaでの、ポルノに関しての情報処理技術についてのLTがあったこと。
(そして、実際にそれを聞いて傷ついた女性が存在し、問題が提起されました)
RubyhirobaはRubyKaigiとは独立した、せっかく東京にRubyistがたくさん居るんだから交流しよう!という、
LTとWorkshopと交流の場を提供するイベントです。
View solr-3.6.0-kuromoji-schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<schema name="sunspot" version="1.0">
<types>
<!-- 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"/>
View markdown2inao.pl
#!/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
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"
end
@hsbt
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="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css">
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></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>
View markdown2inao.pl
#!/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;