We made it possible. Next, we'll make it beautiful.
Suffering-oriented programming
- 柔軟性向上
- 予想以上に複雑な使い方をしているケースが多かったので、設定ファイルも複雑化して対応する
#!/bin/bash | |
export LANG=C | |
for service in $(/sbin/chkconfig --list | grep 3:on | awk '{ print $1 }') | |
do | |
while : | |
do | |
echo -n "disable $service ?: " | |
read answer | |
case $answer in | |
Y|y) |
require 'formula' | |
class Emacs < Formula | |
url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.3a.tar.bz2' | |
md5 'f2cf8dc6f28f8ae59bc695b4ddda339c' | |
homepage 'http://www.gnu.org/software/emacs/' | |
if ARGV.include? "--use-git-head" | |
head 'git://repo.or.cz/emacs.git' | |
else |
#!/usr/bin/ruby | |
# vim:set fileencoding=utf-8 : | |
require 'shellwords' | |
ARGF.each do | |
|line| | |
line.chomp! | |
line.sub!(/\A.+?;/, '') rescue next | |
next unless m = line.match(/\Acd\s+(~?\/.*)/) |
We made it possible. Next, we'll make it beautiful.
Suffering-oriented programming
Example#1: | |
{{#is_alert}}sample error message @jay@datadog @slack-ops-test {{/is_alert}} | |
Example#2: | |
sample error message | |
{{#is_alert}} @jay@datadog @slack-ops-test @pagerduty {{/is_alert}} |
#!/bin/sh | |
# The original script is here: https://gist.githubusercontent.com/railwaycat/10988446/raw/990dde69ea728b9ceff68dd649ad2112c5692ef0/build-emacs.app.sh | |
rootdir=$HOME/Desktop/emacs_mac_port | |
if [ ! -d $rootdir ]; then | |
mkdir $rootdir | |
fi | |
installprefix=$rootdir/build | |
app_dir=$installprefix/Emacs.app/Contents/Resources | |
source_url=ftp://alpha.gnu.org/gnu/emacs/pretest |
EMACS_VER=24.3 | |
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz | |
curl -O https://gist.github.com/anonymous/8553178/raw/c0ddb67b6e92da35a815d3465c633e036df1a105/emacs.memory.leak.aka.distnoted.patch.diff | |
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch | |
tar xvfz emacs-${EMACS_VER}.tar.gz | |
cd emacs-${EMACS_VER} |
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu |