Skip to content

Instantly share code, notes, and snippets.

View nikuyoshi's full-sized avatar
🇯🇵

Hiroki Uchida nikuyoshi

🇯🇵
View GitHub Profile
@nikuyoshi
nikuyoshi / build-crosscompile-env.sh
Last active November 20, 2022 13:17
Goのクロスコンパイル環境構築のためのシェルスクリプト
#!/bin/sh
# Environment list
# $GOOS $GOARCH
# darwin 386
# darwin amd64
# freebsd 386
# freebsd amd64
# freebsd arm
# linux 386
@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 / 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 / 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 / ubuntu_12_10_zabbix_agent.rst
Created April 6, 2014 11:51
Ubuntu 12.10にZabbix Agentをインストールした時の手順

Ubuntu 12.10にZabbix Agentをインストールした

VMware Fusion上のCentOSからVMware Fusion上のUbuntuに対して監視を行うために、諸々の設定を行った。 ホストOSはMac OSX(Mavericks)。

ネットワーク、セキュリティ周りの設定

ネットワーク

@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 / memo.rst
Created March 13, 2016 14:01
Intellij IDEA ハンズオン 2015-03-04

IntelliJ IDEA ハンズオン

ショートカットに関して

  • デフォルトのMac OS X 10.5+ を使ったほうが良いとのこと
  • ⌘ + N : クラス作成, HTMLファイル作成等