Skip to content

Instantly share code, notes, and snippets.

View nikuyoshi's full-sized avatar
🇯🇵

Hiroki Uchida nikuyoshi

🇯🇵
View GitHub Profile
@nikuyoshi
nikuyoshi / result.txt
Last active August 12, 2018 13:54
Ansible Playbook for setting sequential path in the set_fact
TASK [debug] **************************************************************************************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"instance_path_list": [
"/var/log/instance_1/log",
"/var/log/instance_2/log",
"/var/log/instance_3/log",
"/var/log/instance_4/log"
]
}

Keybase proof

I hereby claim:

  • I am nikuyoshi on github.
  • I am nikuyoshi (https://keybase.io/nikuyoshi) on keybase.
  • I have a public key ASB8EcpfIhKl1H7wYflx1j9bIZ1JFqE18tt2ORPeE06mGAo

To claim this, I am signing this object:

@nikuyoshi
nikuyoshi / hoge.sh
Created November 22, 2016 05:47
curlでネットワークスピードを確認するワインライナー
curl http://hoge.com -o /dev/null
# 何度も実行する場合
# 参考: http://stackoverflow.com/questions/1289026/syntax-for-a-single-line-bash-infinite-while-loop
while true; do curl http://hoge.com -o /dev/null; sleep 1; done
@nikuyoshi
nikuyoshi / hoge.java
Created August 15, 2016 16:01
ファイルを一行で読み込む
public class AAA{
public void main(){
String str = new String(Files.readAllBytes(Paths.get("fuga.txt")));
}
}
#!/bin/sh
#######################################################
#
# Precondition: Complete executing the following command
# ssh-keygen -t rsa
#
# How to use:
# sh ssh-auto-auth.sh {user name}@{IP address}
#
@nikuyoshi
nikuyoshi / aaa.sh
Last active April 24, 2016 16:18
数枚のjpgからgif画像作成(ImageMagick使用)
convert -delay 20 -loop 0 IMG_*.jpg hoge.gif
@nikuyoshi
nikuyoshi / setCalendar.js
Created March 27, 2016 15:54
FEELCYCLEから送られてくるメールを元にGoogleカレンダーに登録するGoogleAppsScript
function setMyGoogleCalendar(){
var gmailThread = specifyMailFromFeelcycle();
var lessonList = parsePlainBody(gmailThread);
createGoogleCalendarEvent(lessonList);
removeGoogleCalendarEvent(lessonList);
}
function specifyMailFromFeelcycle(){
var gmailThreads = GmailApp.search("from:feelcyclem@feelcycle.com FEELCYCLE ご予約登録");
// Get the registering threads
@nikuyoshi
nikuyoshi / memo.rst
Created March 13, 2016 14:01
Intellij IDEA ハンズオン 2015-03-04

IntelliJ IDEA ハンズオン

ショートカットに関して

  • デフォルトのMac OS X 10.5+ を使ったほうが良いとのこと
  • ⌘ + N : クラス作成, HTMLファイル作成等
@nikuyoshi
nikuyoshi / readme.md
Created February 8, 2016 15:26
three.jsでメッシュ状の球体を実装した
@nikuyoshi
nikuyoshi / file0.txt
Created January 8, 2016 17:14
Active Directory Service Interface(ADSI)を使用したプライマリグループの変更 ref: http://qiita.com/nikuyoshi/items/0a9d6bc47de81ae7b5eb
$primaryGroup = [adsi]"LDAP://CN=group1,OU=ou1,dc=hoge,dc=local"
$primaryGroup.GetInfoEx(@("primaryGroupToken"), 0)
$primaryGroupToken = $primaryGroup.Get("primaryGroupToken");
$user = [adsi]("LDAP://CN=user1,OU=ou1,dc=hoge,dc=local")
$user.Put("primaryGroupId", $primaryGroupToken)
$user.SetInfo()