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 | |
| use 5.014; | |
| use warnings; | |
| use Encode qw/decode_utf8 encode_utf8/; | |
| use Unicode::Normalize qw/NFC/; | |
| use File::Basename qw/basename dirname/; | |
| use File::Copy qw/move/; | |
| use File::Spec; | |
| for my $file (@ARGV) { |
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
| git log -p -S '検索したい文字列' |
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/sh | |
| # iOSシミュレータの中に保存されたUserDefaultsを直接いじる為のスクリプト | |
| # | |
| # HOW TO USE | |
| # | |
| # A. 対話インタフェース | |
| # $ sh ./open_userdefaults_file_in_simulator | |
| # => デバイスIDを聞かれるので入力する | |
| # |
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/sh | |
| DIGITS=4 | |
| read NUMBER | |
| printf "%0${DIGITS}d\n" $NUMBER |
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 | |
| BEG=1 | |
| MAX=60 | |
| OUTDIR=~/tmp/download | |
| EXTENSION=.csv | |
| mkdir -p $OUTDIR | |
| i=$BEG | |
| while [ $i -le $MAX ] |
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/sh | |
| COMMITID_FROM=hogehoge | |
| COMMITID_TO=fugafuga | |
| PATH_PATCHFILE=~/tmp/diff.patch | |
| # バージョン間の修正に関するパッチを作成 | |
| git diff --no-prefix $COMMITID_FROM $COMMITID_TO > $PATH_PATCHFILE | |
| # パッチを適用 |
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 | |
| BEG=1 | |
| MAX=99 | |
| KEYWORD="text/javascript" | |
| i=$BEG | |
| while [ $i -lt $MAX ] | |
| do | |
| url="http://example.com/${i}.html" |
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/sh | |
| LASTIP_FILE=/var/tmp/lastip | |
| if [ ! -e $LASTIP_FILE ]; then | |
| echo "NONE" > $LASTIP_FILE | |
| fi | |
| LastIP=$(cat $LASTIP_FILE); | |
| CurrIP=$(curl ipcheck.ieserver.net); | |
| if [ $LIP != $CIP ] ; then | |
| msg="グローバルIPアドレスが変化しました。[NEW]:$CurrIP [OLD]:$LastIP"; |
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/php | |
| <?php | |
| $contentUrl= contentURL(); | |
| echo($contentUrl . "\n"); | |
| function contentURL(){ | |
| $PODCAST_URL = "http://www.nhk.or.jp/r-news/podcast/nhkradionews.xml"; | |
| $xml = file_get_contents($PODCAST_URL); | |
| if ($xml == null || $xml == "") { |
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 python | |
| # -*- coding: utf-8 -*- | |
| import commands | |
| ip = commands.getoutput('wget -q -O - ipcheck.ieserver.net') | |
| print ip |
NewerOlder