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
package Bowling::Score; | |
use strict; | |
use warnings; | |
sub new { | |
my $class = shift; | |
my @args = @_; | |
my $args_ref = ref $args[0] eq 'HASH' ? $args[0] : {@args}; |
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/lua | |
maxnum = tonumber(arg[1]) or 40 | |
max, min = 0, 0 | |
lines = io.stdin:lines() | |
arrays = {} | |
for line in lines do | |
-- split | |
local tmps = {} |
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/lua | |
maxnum = tonumber(arg[1]) or 40 | |
max, min = 0, 0 | |
lines = io.stdin:lines() | |
arrays = {} | |
for line in lines do | |
-- split | |
local tmps = {} |
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 | |
if [ $# -eq 0 ];then | |
echo 'USAGE: '$0' [second] command....' | |
exit; | |
fi | |
_CMD="$@" | |
_TIME=5 | |
if [ $# -gt 1 ];then |
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 GIT_COMMITTER_DATE="Fri Jun 21 20:26:41 2013 +0900" | |
git commit --amend --date "Fri Jun 21 20:26:41 2013 +0900" -m 'fix committer_date and author_date' | |
unset GIT_COMMITTER_DATE | |
export GIT_COMMITTER_DATE="2013-08-01 23:01:01 +0900" | |
git commit --amend --date "2013-08-01 23:01:01 +0900" -m 'fix committer_date and author_date' | |
unset GIT_COMMITTER_DATE |
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 | |
_DIR="$1"; | |
_NAME=`basename $_{DIR}` | |
_OIFS=${IFS} | |
IFS=" | |
" | |
cd "$_{DIR}"; |
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 | |
_MEM_INFO=`cat /proc/meminfo` | |
_MEM_TOTAL=`echo "$_MEM_INFO" | grep MemTotal | awk '{print $2}'` | |
_MEM_FREE=`echo "$_MEM_INFO" | egrep '(MemFree|Inactive):' | awk '{v += $2} END {print v}'` | |
_RSS_TOTAL=0 | |
_SHARED_TOTAL=0 | |
_PROC_COUNT=0 |