Skip to content

Instantly share code, notes, and snippets.

Kenji Naito kenjiskywalker

Block or report user

Report or block kenjiskywalker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kenjiskywalker / netatmo.rb
Last active Jun 27, 2017
View netatmo.rb
#!/usr/bin/env ruby
require 'net/https'
require 'json'
require 'uri'
require 'pp'
@netatmo_config = {
sudo yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
mkdir /tmp
cd /tmp
git clone --depth 1 git://
cd yasm
autoreconf -fiv
kenjiskywalker /
Last active Dec 18, 2016 — forked from ijin/
Sync to S3 and notify via Slack
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
# 引数で配布先のbucketを分けたい
if [ $#$ -ne 1 ]; then
export SL_COLOR="danger"
export SL_TEXT="Sync failure: Not enough args in CircleCI: $S3 - ${CIRCLE_BRANCH} (<${CIRCLE_COMPARE_URL}|${SHA1}>) by ${CIRCLE_USERNAME} !!"
export SL_ICON=""
kenjiskywalker /
Created Nov 25, 2016 — forked from goldeneggg/
Dockerfileの CMD と ENTRYPOINT の挙動の違いメモ


  • ざっくり概要として、CMDとENTRYPOINT どちらを使うかによって docker run CONTAINER_ID <command> した際の<command>が及ぼす影響 が変わる

CMD, ENTRYPOINTで オプションなしのコマンド を記述した場合

CMD 使用時

  • Dockerfile
kenjiskywalker / op2hg.rb
Last active Oct 11, 2016
To Hugo from Octpress adapt content dirs.
View op2hg.rb
#/usr/bin/env ruby
require 'fileutils'
DIR = "./content/post/"
# FIX: date format
# find ./content/post/ -type f -exec sed -i "" -e 's/date: \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\) \([0-9]\{2\}:[0-9]\{2\}\).*$/date: \1T\2:00+09:00/g' {} \;
View main.go
package main
import (
func main() {
type PersonalData struct {
kenjiskywalker / zip.go
Last active Jul 20, 2016
View zip.go
package main
import (
View ruboty-test.rb
module Ruboty
module Handlers
class Test < Base
/test\z/i, # "@ellen ping"に反応して
name: "test", # #pingメソッドが呼ばれる
description: "TTT" # これは"@ellen help"でhelpを表示したとき説明文として表示される
def test(message)
View struct_vs_hash.rb
#!/usr/bin/env ruby
require 'benchmark'
# Struct
s =, :bar, :baz)
s =, nil, nil)
# Hash
h = {foo: nil, bar: nil, baz: nil}
You can’t perform that action at this time.