Skip to content

Instantly share code, notes, and snippets.

View moomindani's full-sized avatar

Noritaka Sekiyama moomindani

View GitHub Profile
@moomindani
moomindani / install-pip
Created June 16, 2014 05:13
Installing pip using get-pip.py
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
@moomindani
moomindani / install-jq
Last active March 12, 2021 14:20
install jq (64bit system)
wget http://stedolan.github.io/jq/download/linux64/jq
chmod +x ./jq
sudo cp jq /usr/bin
@moomindani
moomindani / ha.cf
Created April 28, 2014 06:27
ha.cf (using ucast)
pacemaker on
#
# There are lots of options in this file. All you have to have is a set
# of nodes listed {"node ...} one of {serial, bcast, mcast, or ucast},
# and a value for "auto_failback".
#
# ATTENTION: As the configuration file is read line by line,
# THE ORDER OF DIRECTIVE MATTERS!
#
# In particular, make sure that the udpport, serial baud rate
@moomindani
moomindani / corosync.conf
Created April 29, 2014 08:17
using udpu
# Please read the corosync.conf.5 manual page
compatibility: whitetank
aisexec {
user: root
group: root
}
service {
name: pacemaker
@moomindani
moomindani / wpa_supplicant.conf
Created April 30, 2014 03:53
Enable wifi on raspberry pi and connect to Apple TimeCapsule
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="moomin_wireless_network"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=TKIP CCMP
group=TKIP CCMP
psk=xxx
}
@moomindani
moomindani / jr_east_station_timetable.json
Created August 31, 2018 08:09
JR East: Station Timetable
[{
"@context": "http:\/\/vocab.odpt.org\/context_odpt.jsonld",
"odpt:calendar": "odpt.Calendar:SaturdayHoliday",
"odpt:station": "odpt.Station:JR-East.JobanRapid.Ueno",
"odpt:railDirection": "odpt.RailDirection:Inbound",
"@id": "urn:ucode:_00001C0000000000000100000320832E",
"odpt:stationTimetableObject": [{
"odpt:train": "odpt.Train:JR-East.JobanRapid.752H",
"odpt:trainType": "odpt.TrainType:JR-East.Local",
"odpt:destinationStation": [
@moomindani
moomindani / jr_east_train_timetable.json
Last active August 31, 2018 08:09
JR East: TrainTimetable
[{
"@context": "http:\/\/vocab.odpt.org\/context_odpt.jsonld",
"odpt:trainType": "odpt.TrainType:JR-East.Local",
"odpt:calendar": "odpt.Calendar:Weekday",
"@id": "urn:ucode:_00001C000000000000010000031085A0",
"odpt:railDirection": "odpt.RailDirection:Outbound",
"odpt:originStation": [
"odpt.Station:JR-East.JobanRapid.Ueno"
],
"@type": "odpt:TrainTimetable",
@moomindani
moomindani / elblog2redshift.json
Created November 24, 2014 00:23
Import ELB log into Redshift using Data Pipeline
{
"objects": [
{
"id": "Default",
"scheduleType": "TIMESERIES",
"failureAndRerunMode": "CASCADE",
"name": "Default",
"pipelineLogUri": "s3://path_to_log",
"role": "DataPipelineDefaultRole",
"resourceRole": "DataPipelineDefaultResourceRole"
@moomindani
moomindani / vote.coffee
Created September 3, 2014 10:06
Hubot script: Utility commands for voting someone.
# Description:
# Utility commands for voting someone.
#
# Commands:
# <name>++, <name>--, !vote-list, !vote-clear
module.exports = (robot) ->
KEY_SCORE = 'key_score'
getScores = () ->
@moomindani
moomindani / cloudfrontlog2redshift.json
Created November 24, 2014 00:28
Import CloudFront log into Redshift using Data Pipeline
{
"objects": [
{
"id": "Default",
"scheduleType": "TIMESERIES",
"failureAndRerunMode": "CASCADE",
"name": "Default",
"pipelineLogUri": "s3://path_to_log",
"role": "DataPipelineDefaultRole",
"resourceRole": "DataPipelineDefaultResourceRole"