Skip to content

Instantly share code, notes, and snippets.

View 1syo's full-sized avatar

Kazunari Takahashi 1syo

View GitHub Profile
@jugyo
jugyo / force_require.rb
Created October 27, 2010 01:38
force_require for bundler
# force_require.rb
#
# == Usage
#
# require 'bundler/setup'
# require './force_require'
#
# force_require 'g'
# g 'foo'
#
@mislav
mislav / aprompt.png
Last active February 11, 2024 06:40
My zsh prompt. No oh-my-zsh needed
aprompt.png
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@jsor
jsor / .travis.yml
Created March 2, 2012 10:59
TravisCI/HipChat Webhook
notifications:
webhooks: http://example.com/travisci-hipchat-webhook.php
@mceachen
mceachen / .travis.yml
Created April 9, 2012 01:28
Travis CI with multiple database engines
language: ruby
rvm:
- 1.9.3
env:
- DB=sqlite
- DB=mysql
- DB=postgresql
#!/var/lib/jenkins/.rvm/bin/rvm-shell ruby-1.9.3-p194@sqale
export RAILS_ENV=test
bundle install --without production
git checkout -b feature/bundle-update-`date +%Y%m%d`
bundle update
git add Gemfile Gemfile.lock
git commit -m 'bundle update'
git push origin feature/bundle-update-`date +%Y%m%d`
@jugyo
jugyo / to_factory_girl.rb
Created November 7, 2012 05:54
ActiveRecord extension to print FactoryGirl definition!
class ActiveRecord::Base
# Usage:
#
# > puts User.first.to_factory_girl
# FactoryGirl.define do
# factory :user do
# ...
# end
# end
# # Usage: FactoryGirl.create(:user, ...)
@caarlos0
caarlos0 / deploy.sh
Last active December 18, 2017 01:00
Continous deploy with Jenkins and Heroku. This is the post-build script.
#!/bin/bash
#
# login in the jenkins server with:
#
# heroku login
# heroku keys:add
#
# Doing so, jenkins will have permission to deploy to
# the heroku remote.
#
@ginkouno
ginkouno / Gemfile
Last active August 29, 2015 13:58
poi server(?)をdaemonとして起動する
source "https://rubygems.org"
gem "jruby-poi", github: "kameeoze/jruby-poi", require: "poi"
gem "spoon_daemon"
gem "pry"
gem "bundler", require: ['drb/drb', 'stringio']
@bobbyjam99-zz
bobbyjam99-zz / App.java
Created April 8, 2014 09:13
POIでファイルにパスワード
package sample.poi;
import java.io.FileOutputStream;
import java.io.OutputStream;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.poifs.crypt.EncryptionInfo;
import org.apache.poi.poifs.crypt.EncryptionMode;
import org.apache.poi.poifs.crypt.Encryptor;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;