Skip to content

Instantly share code, notes, and snippets.


Daisuke Takeuchi daicham

  • Tokyo, Japan
View GitHub Profile
daicham / Vagrantfile
Created Jul 15, 2014
Vagrantfile for ec2
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "dummy"
config.vm.provider :aws do |aws, override|
daicham / gist:dec93e7c8b133a66e98b
Last active Aug 29, 2015
[WIP] Installing Gitlab CE Omnibus Package on CentOS 6
View gist:dec93e7c8b133a66e98b

Installing Gitlab Omnibus Package on CentOS 6.0

see also:

sudo yum install curl openssh-server postfix cronie -y
sudo service postfix start
sudo chkconfig postfix on
daicham / gist:8fcdc6113591ffc819ad
Last active Aug 29, 2015
Download kernel source for CentOS 6
View gist:8fcdc6113591ffc819ad
daicham / proxy.conf
Last active Aug 29, 2015
Apache2 reverse proxy setting for fixing a Jekins warning
View proxy.conf
# See also:
# Tested on Apache2.2.15/CentOS6
# /etc/httpd/conf.d/proxy.conf
ProxyPass /jenkins http://localhost:8080/jenkins nocanon
ProxyPassReverse /jenkins http://localhost:8080/jenkins
ProxyRequests off
AllowEncodedSlashes on
daicham / gist:1593715
Created Jan 11, 2012
Import csv to Outlook calendar by ruby
View gist:1593715
require 'win32ole'
require 'kconv'
require 'csv'
require 'date'
class Ticket
attr_reader :id
attr_reader :subject
attr_reader :from
attr_reader :to
daicham / gist:1593722
Created Jan 11, 2012
Export csv from a Oracle table by sqlplus
View gist:1593722
sqlplus -s << EOF > ${sdata_file}
set echo off
set linesize 1000
set pagesize 0
set trimspool on
set trimout on
set feedback off
set colsep ','
daicham / gist:1593740
Created Jan 11, 2012
iCalendar by ruby
View gist:1593740
require 'rubygems'
require 'icalendar'
require 'date'
cal =
cal.event do
dtstart, 05, 19, 22, 00), {'TZID' => 'Asis/Tokyo'}
dtend, 05, 19, 22, 30), {'TZID' => 'Asis/Tokyo'}
summary "うちあわせ"
daicham / gist:1964899
Created Mar 3, 2012
Show simple alert dialog on iOS
View gist:1964899
UIAlertView *alert = [[UIAlertView alloc]
delegate: nil
[alert show];
[alert release];
daicham / random.bat
Last active Oct 1, 2015
Generate random strings and copy to clipboard by ruby on batch file
View random.bat
@echo off
ruby -S -x %0 %*
goto end
#! ruby
require 'win32/clipboard' # before install "win32-clipboard" gem
pattern = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
puts "Random String => " +{pattern[rand(pattern.size)]}.join
Win32::Clipboard.set_data(value, Win32::Clipboard::UNICODETEXT)
puts "Stored to clipboard"
You can’t perform that action at this time.