Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
😄

Kenichi Takahashi kenchan

💭
😄
View GitHub Profile
View ThreadMain.java
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class Main {
private static LinkedBlockingQueue<LuceneIndex> queue = new LinkedBlockingQueue<LuceneIndex>();
public static void main(String[] args) throws Exception {
View gist:39864
xrandr --output LVDS --output VGA --mode 1280x1024 --right-of LVDS
View gist:39865
xrandr --output LVDS --output VGA --off
View stats.rb
#!/bin/ruby
require 'rubygems'
require 'activesupport'
require 'calendar/japanese/holiday'
class Date
include Calendar::Japanese::Holiday
end
View application_template.rb
# Copy database.yml
run 'cp config/database.yml config/database.yml.example'
# Delete unnecessary files
run 'rm public/index.html'
# Install gems
gem 'amatsuda-i18n_generators', :source => 'http://gems.github.com', :lib => false
gem 'rspec-rails', :lib => false
gem 'cucumber', :lib => false
View blogger-template.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<script type="text/javascript" src="http://s.hatena.com/js/HatenaStar.js"></script>
<script type="text/javascript">
Hatena.Star.Token = 'da1b86e8a86a29f912223bd7934849db79663de4';
</script>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
View gist:243373
#!/bin/env ruby
n = 3
hash = {}
n.downto(1).each { |i| hash[i] = [] }
hoges.each do |hoge|
hash[hoge.fuga] << fuga if hash[hoge.fuga]
View post-checkout
#!/bin/sh
if [ -f rerun.txt ]
then
rm rerun.txt
fi
View astah-community-6.1.ebuild
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
S="${WORKDIR}/astah_community"
SRC_URI="${PN}-6_1.zip"
DESCRIPTION="Lightweight UML Editor"
HOMEPAGE="http://astah.change-vision.com/"
LICENSE="as-is"
SLOT="0"
View make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS=$CFLAGS
LINGUAS="ja"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
You can’t perform that action at this time.