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/sh | |
arch=`arch` | |
package_name='emacs' | |
version='24.4' | |
url="http://ftpmirror.gnu.org/${package_name}/${package_name}-${version}.tar.gz" | |
option='--without-x' | |
build=`mktemp -d ${PWD}/${package_name}-build.XXXXX` | |
mkdir ${build}/src && cd ${build}/src | |
wget ${url} | |
tar --gzip --extract --file ${package_name}-${version}.tar.gz |
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/sh | |
arch='x86-64' | |
version='9.2' | |
package_name="mit-scheme" | |
url="http://ftpmirror.gnu.org/mit-scheme/stable.pkg/${version}/${package_name}-${version}-${arch}.tar.gz" | |
build=`mktemp -d ${PWD}/${package_name}-build.XXXXX` | |
mkdir ${build}/src && cd ${build}/src | |
wget $url | |
tar --gzip --extract \ | |
--file ${package_name}-${version}-${arch}.tar.gz |
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/sh | |
arch='x86-64' | |
package_name='sbcl' | |
version='1.2.6' | |
url="http://ftp.jaist.ac.jp/pub/sourceforge/s/sb/sbcl/sbcl/${version}/${package_name}-${version}-${arch}-linux-binary.tar.bz2" | |
option='' | |
build=`mktemp -d ${PWD}/${package_name}-build.XXXXX` | |
mkdir ${build}/src && cd ${build}/src | |
wget ${url} | |
tar --bzip2 --extract \ |
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
(defmacro use (elisp &rest body) | |
(declare (indent defun)) | |
`(when (require (quote ,elisp) nil t) ,@body)) | |
(font-lock-add-keywords | |
'emacs-lisp-mode | |
'(("(\\(use\\)\\_>[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)" | |
(1 font-lock-keyword-face) (2 font-lock-constant-face)))) |
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 | |
set -e | |
function main () { | |
local jafname=$* | |
local enfname=`echo $jafname | nkf -e | kakasi -Ha -Ka -Ja -Ea -o utf-8` | |
local enfname=$2${enfname#*MP3} | |
mkdir -p "${enfname%/*}" | |
cp ${jafname/ /\ } ${enfname/ /\ } | |
} | |
export -f main |
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 | |
################################################################ | |
# requirements: lame libav | |
################################################################ | |
set -e | |
ROOTDIR=$1 | |
DESTDIR=$2 | |
function main () { | |
local in=${*/~/\~} | |
local out=${in/.flac/.mp3} |
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 | |
function main () { | |
for kana in $(find $1 -mindepth 1 -maxdepth 1 -type f);do | |
local roman=${kana%/*}/$(basename $kana \ | |
| kakasi -Ha -Ka -Ja -Ea -ka -i utf-8 -o utf-8) | |
mv "$kana" "$roman";done | |
for kana in $(find $1 -mindepth 1 -maxdepth 1 -type d);do | |
local roman=${kana%/*}/$(basename $kana \ | |
| kakasi -Ha -Ka -Ja -Ea -ka -i utf-8 -o utf-8) | |
mv "$kana" "$roman";main "$roman";done |
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
export PAHT=$PAH:$HOME/pkg/bin:$HOME/pkg/sbin | |
export MANPATH=$MANPATH:$HOME/pkg/man | |
export INFOPATH=$INFOPATH:$HOME/pkg/info |
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 | |
## run: export SH=/bin/bash;bash ./install-pkgsrc.bash | |
wget -O - ftp://ftp.ne.jp/BSD/NetBSD-pkgsrc/stable/pkgsrc.tar.xz | tar Jxf - | |
cd pkgsrc/bootstrap | |
./bootstrap --unprivileged | |
echo "export PATH=$PATH:$HOME/pkg/bin:$HOME/pkg/sbin" >> $HOME/.bashrc | |
echo "export MANPATH=$MANPAHT:$HOME/pkg/man" >> $HOME/.bashrc | |
echo "export INFOPATH=$INFOPAHT:$HOME/pkg/info" >> $HOME/.bashrc | |
source $HOME/.bashrc |
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
#include <iostream> | |
#include <bitset> | |
#include <vector> | |
#include <string> | |
#include <cmath> | |
int main(int argc, char *argv[]) | |
{ | |
std::string table= | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
"abcdefghijklmnopqrstuvwxyz" |
OlderNewer