Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
#!/bin/bash
USER="growth"
HOME="/home/${USER}"
source $HOME/perl5/perlbrew/etc/bashrc
PERLBREW="${HOME}/perl5/perlbrew/bin/perlbrew"
PERL=`${PERLBREW} list | grep \* | cut -f 2 -d " "`
GROWTHFORECAST=`find ${HOME}/perl5 -type f -name "growthforecast.pl" | grep bin | grep ${PERL}`
@kazu634
kazu634 / mirror.list
Created February 17, 2013 13:11
An apt-mirror configuration sample.
############# config ##################
#
set base_path /share/apt-mirror
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
# set postmirror_script $var_path/postmirror.sh
@kazu634
kazu634 / check_domain.sh
Created January 14, 2013 02:56
Check and Calculate the remaining valid days of the domain, using whois command.
#!/bin/bash
########################################
# Name: Kazuhiro MUSASHI
#
# about:
#
# Usage:
#
# Author:
server {
server_name _;
access_log /var/log/nginx/nagios.kazu634.com.access.log;
error_log /var/log/nginx/nagios.kazu634.com.error.log;
auth_basic "Restricted Area";
auth_basic_user_file /etc/nagios/htpasswd.users;
root /var/www;
index index.php index.html;
@kazu634
kazu634 / gist:3358428
Created August 15, 2012 10:12
remember the milkから取得したXMLファイルのpretty print
#!/usr/bin/perl
# for formality's sake
use strict;
use warnings;
use utf8;
# for XML parse
use XML::Simple;
use Data::Dumper;
kazu634@fluent-master:~$ cd /etc/apt
kazu634@fluent-master:/etc/apt$ ll
total 48
drwxr-xr-x 6 root root 4096 6月 28 00:02 ./
drwxr-xr-x 85 root root 4096 6月 28 00:01 ../
drwxr-xr-x 2 root root 4096 6月 24 13:13 apt.conf.d/
drwxr-xr-x 2 root root 4096 4月 20 19:21 preferences.d/
-rw-r--r-- 1 root root 3377 6月 28 00:02 sources.list
drwxr-xr-x 2 root root 4096 4月 20 19:21 sources.list.d/
-rw------- 1 root root 1200 6月 24 13:00 trustdb.gpg
#!/bin/bash
# Mac側で必要になる作業:
# brew install wakeonlan
# 起動させる側で、マジックパケットを受信するために設定を行う必要がある
# Linuxの場合は、 ethtool をインストールし、設定を実施する
# See: http://tukaikta.blog135.fc2.com/blog-entry-104.html
#!/bin/bash
########################################
# Name: Kazuhiro MUSASHI
#
# about:
#
# Usage:
#
# Author:
if has('mac')
augroup templateload
autocmd!
autocmd BufNewFile *.sh 0r ~/.vim/template/skelton.sh
autocmd BufNewFile *.pl 0r ~/.vim/template/skelton.pl
autocmd BufNewFile *.scm 0r ~/.vim/template/skelton.scm
augroup END
endif