Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
# for formality's sake
use strict;
use warnings;
# Handling the options
use Getopt::Long;
# Default value
m4/.seedlock : m4/seed.m4
@echo "Generating the macro..."
@m4 m4/seed.m4
@touch m4/.seedlock
m4/seed.m4 : src/header src/procedure src/footer
@echo "Generating seed m4 file..."
@bin/template.pl > m4/seed.m4
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
#!/bin/bash
########################################
# Name: Kazuhiro MUSASHI
#
# about:
#
# Usage:
#
# Author:
#!/bin/bash
# Mac側で必要になる作業:
# brew install wakeonlan
# 起動させる側で、マジックパケットを受信するために設定を行う必要がある
# Linuxの場合は、 ethtool をインストールし、設定を実施する
# See: http://tukaikta.blog135.fc2.com/blog-entry-104.html
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
@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;
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 / 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:
@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