View slack_change_status.sh
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 | |
eval "$(cat .env <(echo) <(declare -x))" | |
curl \ | |
-H 'Content-Type: application/json; charset=UTF-8' \ | |
-H "Authorization: Bearer "${SLACK_USER_TOKEN} \ | |
-X POST https://slack.com/api/users.profile.set \ | |
-d '{ "profile": { "status_text": "'$1'", "status_emoji": "'$2'" }}' -vvv |
View copyWin2WSL.sh
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
mkdir -p .ssh && cp /mnt/c/Users/axt/.ssh/* .ssh/ && chmod -R 600 .ssh/* | |
mkdir -p .sbt && cp /mnt/c/Users/axt/.sbt/sbt.repositories .sbt/ | |
mkdir -p .sbt && cp /mnt/c/Users/axt/.sbt/.credentials .sbt/ | |
mkdir -p .m2 && cp /mnt/c/Users/axt/.m2/settings.xml .m2/ |
View install_pocketsphinx.sh
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
#move to paticular folder... | |
if [[ $(uname -a) = *"Ubuntu"* ]]; then | |
#Ubuntuの場合 | |
sudo apt-get install pocketsphinx | |
else | |
#macの場合 | |
brew install cmu-pocketsphinx | |
fi |
View opencv_build_with_contrib.sh
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
#move to paticular folder... | |
#Tesseractに必要なライブラリの導入 | |
if [[ $(uname -a) = *"Ubuntu"* ]]; then | |
#Ubuntuの場合 | |
sudo apt-get install libleptonica-dev | |
sudo apt install libpango1.0-dev | |
elif [[ $(uname -a) = *"Linux"* ]]; then | |
#WSLの場合 | |
sudo apt-get install libleptonica-dev |
View opencv_simple.py
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
# -*- coding: utf-8 -*- | |
import cv2 | |
import argparse | |
#引数 | |
parser = argparse.ArgumentParser(description='in:input file, out: Output file.') | |
parser.add_argument('-i','--input', | |
action='store', | |
nargs='?', | |
type=str, |
View numToTime.pl
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
use strict; | |
use warnings; | |
use POSIX; | |
my $numStr = ""; | |
my $length = @ARGV; | |
if ($length>0){ | |
$numStr = $ARGV[0]; | |
} |
View timeToNum.pl
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
use strict; | |
use warnings; | |
my $timeStr = ""; | |
my $length = @ARGV; | |
if ($length>0){ | |
$timeStr = $ARGV[0]; | |
} | |
else { |
View show SHA-256
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
def getSha256MD(input:String) = { | |
val md = java.security.MessageDigest.getInstance("SHA-256") | |
val ha = new sun.misc.BASE64Encoder().encode(md.digest(input.getBytes)) | |
ha | |
} | |
val input = "input" | |
getSha256MD(input) |
View Jenkinsfile_Sample
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
node { | |
try { | |
stage ('git'){ | |
checkout scm | |
} | |
stage ('build'){ | |
//sh 'mvn clean package' | |
parallel 'maven build':{ | |
sh 'echo test' | |
}, 'node build':{ |
View reversi_jquery.html
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
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script type="text/javascript"> | |
var passYou = false; | |
var passCom = false; | |
var myturn = 0; | |
var yourColor = 0; | |
var comColor = 1; | |
$(function(){ |
NewerOlder