This file contains hidden or 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
;; 第1回 Scheme コードバトン | |
;; | |
;; ■ これは何か? | |
;; Scheme のコードをバトンのように回していき面白い物ができあがるのを楽しむ遊びです。 | |
;; 次回 Shibuya.lisp で成果を発表します。 | |
;; Scheme 初心者のコードを書くきっかけに、中級者には他人のコードを読む機会になればと思います。 | |
;; | |
;; ■ 2 つのルール | |
;; | |
;; (1)自分がこれだと思える変更をコードに加えて2日以内に次の人にまわしてください。 |
This file contains hidden or 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
Snippet development | |
Quickly finding snippets | |
There are some ways you can quickly find a snippet file: | |
* | |
M-x yas/new-snippet | |
Prompts you for a snippet name, then tries to guess a suitable directory to store it, prompting you for creation if it does not exist. Finally, places you in a new buffer set to snippet-mode so you can write your snippet. |
This file contains hidden or 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 perl | |
# === Libraries === | |
use strict; | |
use warnings; | |
use Perl6::Say; | |
use utf8; | |
use Encode; |
This file contains hidden or 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 the LANG to C | |
LANG=C | |
# Acquiring the IP address | |
echo "[`date '+%Y/%m/%d %H:%M:%S'`] Acquiring the IP address." >> /tmp/static_ip.log | |
IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2;}' | cut -f2 -d':'` |
This file contains hidden or 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 | |
for FILE in `find . -name "*" -maxdepth 1` | |
do | |
case $FILE in | |
*.scm) echo $FILE ;; | |
esac | |
done | |
for FILE in `find . -name "*" -maxdepth 1` |
This file contains hidden or 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 | |
/usr/bin/find . -type d -name .git -prune -p -type d -empty -print -exec touch {}/.gitkeep \; |
This file contains hidden or 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 | |
# finding out the shell script directory | |
CURDIR=`dirname $0` | |
# copying the .files as a soft link | |
find $CURDIR -type f -name ".*" -maxdepth 1 -print0 | xargs -0 -J % ln -s % $HOME 2>/dev/null |
This file contains hidden or 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
" <statusline> | |
let g:gitCurrentBranch = '' | |
function! CurrentGitBranch() | |
let cwd = getcwd() | |
cd %:p:h | |
let branch = matchlist(system('/usr/bin/env git branch -a --no-color'), '\v\* ([0-9A-Za-z\/]*)\r?\n') | |
execute 'cd ' . cwd | |
if (len(branch)) | |
let g:gitCurrentBranch = '[git:' . branch[1] . ']' | |
else |
This file contains hidden or 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
# foreach(x, (item_1, item_2, ..., item_n), stmt) | |
define(`foreach', `pushdef(`$1', `')_foreach(`$1', `$2', `$3')popdef(`$1')') | |
define(`_arg1', `$1') | |
define(`_foreach', | |
`ifelse(`$2', `()', , | |
`define(`$1', _arg1$2)$3`'_foreach(`$1', (shift$2), `$3')')') |
This file contains hidden or 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 perl | |
# for formality's sake | |
use strict; | |
use warnings; | |
# reading directories | |
opendir(DIR,'.') or die "$!"; | |
my $index = 0; |
OlderNewer