This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add to /etc/rc.local | |
sp_hostname=`curl -L http://10.10.11.95/server-provision/server.instance_id 2>/dev/null` | |
if [ -n $sp_hostname ]; then | |
hostname $sp_hostname | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
port selfupdate \ | |
&& port sync \ | |
&& port outdated \ | |
&& port upgrade installed \ | |
&& port uninstall inactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-eth1 | |
DEVICE=eth1 | |
BOOTPROTO=static | |
NETMASK=255.255.255.0 | |
IPADDR=$1 | |
ONBOOT=yesEOF | |
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-eth2 | |
DEVICE=eth1 | |
BOOTPROTO=dhcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; for magit commit problem | |
;; http://www.mail-archive.com/[email protected]/msg00420.html | |
(defun start-file-process (name buffer program &rest program-args) | |
"Start a program in a subprocess. Return the process object for it. | |
Similar to `start-process', but may invoke a file handler based on | |
`default-directory'. See Info node `(elisp)Magic File Names'. | |
This handler ought to run PROGRAM, perhaps on the local host, | |
perhaps on a remote host that corresponds to `default-directory'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'mechanize' | |
$ID = "tumf" | |
$PASSWORD="*****" | |
$PLUGINS = [ | |
"sfDocTestPlugin", | |
"sfGuardMemberPlugin", | |
"sfMobileCarrierJPPlugin", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pear channel-discover pear.pdepend.org | |
pear channel-discover pear.phpmd.org | |
pear channel-discover pear.phpunit.de | |
pear channel-discover components.ez.no | |
pear channel-discover pear.symfony-project.com | |
pear install --alldeps pdepend/PHP_Depend | |
pear install --alldeps phpmd/PHP_PMD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; git-now | |
;; http://d.hatena.ne.jp/sinsoku/20101208/1291770514 | |
(defun git-now () | |
(interactive) | |
(save-buffer) | |
(shell-command "git-now")) | |
(global-set-key "\C-x\C-s" 'git-now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# -*- ruby -*- | |
require 'redgreen/autotest' | |
module Autotest::Growl | |
def self.growl title, msg, img="~/.rails_ok.png", pri=0, sticky="" | |
msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}" | |
# autotestは使わないので、-nで指定するアプリケーション名はautospecで良いと思う | |
# -Hで通知先のGrowlのあるホスト名を指定する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pmset -a hibernatemode 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
require 'rails-stirng-executer' | |
include 'MyApp' | |
=end | |
require "fileutils" | |
class String | |
def self.exec_stat_path | |
File.join(Rails.root,"log","commands.stat") | |
end |
OlderNewer