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 main | |
import ( | |
"fmt" | |
"regexp" | |
) | |
func main() { | |
re := regexp.MustCompile(`^([^\s]+)\s([^\s]+)$`) | |
names := []string{ |
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 | |
# -*- coding: utf-8 -*- | |
for f in * ; do | |
nf=`echo "$f" | sed -E 's/\s/_/g'` | |
mv "$f" "$nf" | |
done | |
ls |
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 | |
# -*- coding: utf-8 -*- | |
for f in *.zip; do | |
# unarはbashに標準では存在しないコマンド | |
# 別途apt-getする必要がある | |
# 処理内容はzipの解凍 | |
unar $f | |
# 展開したディレクトリ名には空白文字が含まれるものもある |
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
# 1. caseの末尾には;;が必須 | |
# 2. s:cの:はその後に文字列が必要 | |
# 3. case内の$OPTARGで文字列を取得 | |
srcfile=? | |
compileflag=false | |
while getopts s:c opts; do | |
case $opts in | |
s) srcfile=$OPTARG;; | |
c) compileflag=true;; |
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
/** | |
* 特定のシートのコピーを生成する。 | |
*/ | |
function copyTestSheet() { | |
var prefix = "入力"; | |
var ss = SpreadsheetApp.getActiveSpreadsheet() | |
var sheet = ss.getSheetByName(prefix + "テンプレート"); | |
var newSheetName = prefix + getTodayString("/"); | |
sheet.copyTo(ss).setName(newSheetName) |
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
// 他の言語で言うimport文 | |
var fs = require("fs"); | |
// コマンドライン引数 | |
// args[0] == node自身 | |
// args[1] == このソースファイル自身 | |
var args = process.argv; | |
// ファイルが存在するとき | |
// err == nil |
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 main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
) | |
func init() { |
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 main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
"regexp" | |
) |
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
rm dummy/* | |
1..120 | % { $num="dummy\" + ([string]$_) + ".zip"; echo "" > $num} |
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
builds: | |
- binary: appname | |
goos: | |
- windows | |
- darwin | |
- linux | |
goarch: | |
- amd64 | |
- 386 | |
archive: |
OlderNewer