Skip to content
View gist:293ddcc279051c1585d5
date=`date +%Y-%m-%d`
HEADER="Backup data"
echo "Removing directory $1 files older than $RETENTION_PERIOD days" | wall
find $1 -type f -mtime +$2 -exec rm '{}' \;

Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。


  • Version: CoreOS 343.0.0
  • Kernel: 3.14.5
  • Docker: 1.0
View gist:8347351
set nocompatible
filetype off
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
set encoding=utf-8
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
set tabstop=4
set shiftwidth=4
echo -e "\ -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: -n100 -c10 \n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark_${1}_${2}.png'
set title 'ab ${1} ${2}'
View gist:6237795
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
export JAVA_HOME
export PATH
View jedi-daemon
#!/usr/bin/env perl
use 5.10.0;
use utf8;
use LWP::Simple;
use Encode 'encode';
use Encode::MIME::Header;
use File::Slurp 'slurp';
use Email::MIME;
use Email::Sender::Simple qw(sendmail);
View gist:3791754
// 分頁 test
$subsids = array('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21');
$page = 10;
if (count($subsids) > $page) {
$totle = ceil(count($subsids) / $page);
$subsidIn = "";
for ($i=0; $i < $totle; $i++) {
$tmp = array();
View will_paginate.rb
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
class BootstrapLinkRenderer < LinkRenderer
View warbler.conf
# Disable Rake-environment-task framework detection by uncommenting/setting to false
# Warbler.framework_detection = false
# Warbler web application assembly configuration file do |config|
# Features: additional options controlling how the jar is built.
# Currently the following features are supported:
# - gemjar: package the gem repository in a jar file in WEB-INF/lib
# - executable: embed a web server and make the war executable
# - compiled: compile .rb files to .class files
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
Something went wrong with that request. Please try again.