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 ( | |
"os" | |
"text/template" | |
) | |
type Hoge struct { | |
Count int | |
Material 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/sh | |
GIT_BRANCHES=`git branch | rev | cut -d ' ' -f1 | rev` | |
for BRANCH in $GIT_BRANCHES | |
do | |
if [[ $BRANCH =~ "-" ]]; then | |
printf "\e[31m$BRANCH does not keep naming rules.\e[m\n" | |
printf "\e[31mPlease check your branch naming.\e[m\n" | |
echo 'git branch -m $NEW $OLD' | |
exit 1 | |
fi |
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 | |
## check requirements commands | |
which wget 1>/dev/null 2>/dev/null; | |
wget_res=$? | |
if [ $wget_res -eq 1 ]; | |
then | |
echo -e "\033[0;31merror\033[0;39m" | |
echo "please install wget"; | |
exit 1; |
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
{ | |
"outputs": [ | |
{ | |
"mode": { | |
"refreshRate": 60000, | |
"size": { | |
"height": 736, | |
"width": 1285 | |
} | |
}, |
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 | |
php -r '$file=new SplFileObject("./hoge.csv");while(!$file->eof()){var_dump($file->fgetcsv());}' |
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/zsh | |
CLIENT_ID= | |
CLIENT_SECRET= | |
CODE= | |
ACCESS_TOKEN= | |
REFRESH_TOKEN= | |
# @name get_token | |
# @params $1=client_id |
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
echo $target | sed -e "s/\+/\_/" | sed -e "s/\//-/" | sed -e "s/\=/\./" | base64 |
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
alabaster==0.7.7 | |
argh==0.26.1 | |
Babel==2.2.0 | |
backports-abc==0.4 | |
backports.ssl-match-hostname==3.5.0.1 | |
certifi==2016.2.28 | |
CommonMark==0.5.4 | |
docutils==0.12 | |
future==0.15.2 | |
Jinja2==2.8 |
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
target = 'hoge' | |
print filter(lambda n: n.find('method_name')>1, dir(target)) |
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 fis() | |
{ | |
find . -name "*.$1" | xargs grep -n $2 | |
} |