Skip to content

Instantly share code, notes, and snippets.

View hokkai7go's full-sized avatar

Yutaro Sugai hokkai7go

View GitHub Profile
require "csv"
azuread_csv = Array.new
CSV.foreach("GoogleUserList.csv") do |r|
# google csv format
# First Name [Required],Last Name [Required],Email Address [Required],Password [Required],Password Hash Function [UPLOAD ONLY],Org Unit Path [Required],New Primary Email [UPLOAD ONLY],Status [READ ONLY],Last Sign In [READ ONLY],Recovery Email,Home Secondary Email,Work Secondary Email,Recovery Phone [MUST BE IN THE E.164 FORMAT],Work Phone,Home Phone,Mobile Phone,Work Address,Home Address,Employee ID,Employee Type,Employee Title,Manager Email,Department,Cost Center,2sv Enrolled [READ ONLY],2sv Enforced [READ ONLY],Building ID,Floor Name,Floor Section,Email Usage [READ ONLY],Drive Usage [READ ONLY],Photos Usage [READ ONLY],Storage limit [READ ONLY],Storage Used [READ ONLY],Change Password at Next Sign-In,New Status [UPLOAD ONLY],Advanced Protection Program enrollment
# skip header
if r[0].include?('First Name [Required]')
next
@hokkai7go
hokkai7go / 2017_09_03_songlist.md
Last active September 6, 2017 15:17
hokkaiフェス2017夏で聞いた曲目リスト
@hokkai7go
hokkai7go / 2017-02-12_song_list.md
Created February 12, 2017 11:29
私の(推し)歌を聴けー!2017春 聞いた曲目リスト

私の(推し)歌を聴けー!2017春

2017/02/12

  • 【MV】虹のコンキスタドール「戦場の聖バレンタイン」
  • 【MV】虹のコンキスタドール「THE☆有頂天サマー!!」(虹コン)
  • 【MV】虹のコンキスタドール「限りなく冒険に近いサマー」(虹コン)
  • パスピエ - 永すぎた春, PASSEPIED - Nagasugita Haru
  • パスピエ - ハイパーリアリスト , PASSEPIED - Hyper Realist
  • チャイナタウン - パスピエ
@hokkai7go
hokkai7go / dynamodb_table_size_item_count.sh
Created January 25, 2017 11:36
DynamoDBのストレージ容量(バイト単位)と項目数を出したときのスクリプト
#!/bin/bash
table_list=`AWS_PROFILE=hoge aws dynamodb list-tables | jq -r '.TableNames[]'`
for table in $table_list
do
table_size=`AWS_PROFILE=hoge aws dynamodb describe-table --table-name $table| jq -r '.[].TableSizeBytes'`
if expr $table_size \< 1024 > /dev/null
then
table_size="${table_size} Bytes"
@hokkai7go
hokkai7go / 札幌の電源使えるカフェ情報.md
Created January 22, 2017 08:05
札幌の電源使えるカフェ情報

2017/01/22現在

電源とWi-Fiが使えるカフェ

@hokkai7go
hokkai7go / ec2_instance_list.sh
Created January 11, 2017 02:52
EC2インスタンスの一覧を出したときのスクリプト
AWS_PROFILE=hoge aws ec2 describe-instances | jq -r '["InstanceName","PrivateIpAddress","PublicIpAddress","InstanceId","InstanceType","AvailabilityZone","State.Name","Platform"],(.Reservations[].Instances[] | [(.Tags[] | select(.Key=="Name").Value) // "", .PrivateIpAddress, .PublicIpAddress, .InstanceId, .InstanceType, .Placement.AvailabilityZone, .State.Name, .Platform])|@csv'
Reviewed the log file. There is following output.
<pre>
module.js:328
throw err;
Error: Cannot find module '/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-pm/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/binding/node-v46-linux-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-pm/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3/lib/sqlite3.js:4:15)

#名前

  • すがいです(hokkai7go)

#職業

  • インフラを中心としていろいろやってます

#ステータス

Rails