View get-withings-data.sh
#!/bin/sh
NOW=`date +%s`
YESTERDAY=`date --date='-1day' +%s`
wget -qO - "http://wbsapi.withings.net/measure?action=getmeas&oauth_consumer_key=xxx...xxx&oauth_nonce=xxx...xxx&oauth_signature=xxx...xxx&oauth_signature_method=HMAC-SHA1&oauth_token=xxx...xxx&oauth_version=1.0&userid=nnn...nnn&oauth_timestamp=1234567890&startdate=$YESTERDAY&enddate=$NOW"
View gosh-tweet-update.scm
#!/usr/local/bin/gosh
(use net.twitter)
(use gauche.parseopt)
(define (main args)
(let-args (cdr args)
((help "h|help" => (cut usage (car args)))
(consumer-key "consumer-key=s" "")
(consumer-secret "consumer-secret=s" "")
View all-git-repos-pull-or-clone.sh
#!/bin/sh
SSH_SERVER="git-server" # .ssh/config
SSH_PASSWORD="*****"
SSH_SERVER_REPOS_ROOT_PATH='/repos'
BACKUP_DIR="/home/valvallow/repos"
REPOS_LIST_FILE="/home/valvallow/repos.list"
GIT_COMMAND_PATH="/home/valvallow/opt/bin/git"
# ----------------------------
# find repository
View transpose.scm
#!/usr/bin/env gosh
(use text.csv)
(use file.util)
(use gauche.parseopt)
(define (usage cmd)
(print "Usage: " (sys-basename cmd) " [option ...] <file or input>")
(print " h|help : Show this help")
(print " d|delimiter : default:<tab>")
View run-parts.sh
# run-parts: Runs all the scripts found in a directory.
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts <directory>"
exit 1
fi
View timebomb.sh
#!/bin/sh
usage ()
{
echo 'usage: '`basename "$0"` '[-h|-d] days target-directory'
echo ' options: '
echo ' -h : show this help'
echo ' -d : force delete'
exit;
}
View tweet-bals-batch-bulk.scm
#!/usr/bin/env gosh
(use file.util)
(use net.twitter)
(use gauche.threads)
(use gauche.parseopt)
(define (usage cmd)
(print "Usage: " (sys-basename cmd) " [option ...] message")
(print " h|help : Show this help")
View tweet-bals-batch-bulk.scm
#!/usr/bin/env gosh
(use file.util)
(use net.twitter)
(use gauche.threads)
(use gauche.parseopt)
(define (usage cmd)
(print "Usage: " (sys-basename cmd) " [option ...] message")
(print " h|help : Show this help")
View ab2maru.scm
(use srfi-13)
(use srfi-14)
(define (ab->maru str)
(string-map
(^c (let1 i (char->integer c)
(integer->char
(cond ((char-set-contains? #[a-z] c)
(+ (- i (char->integer #\a)) #x24d0))
((char-set-contains? #[A-Z] c)
View git-multi-pull.sh
#!/bin/sh
BASE_DIR=`pwd`
if [ "$#" -eq 0 ] ; then
echo 'Usage: ' "$0" ' dirname ...'
exit
fi
for dir in $@