Skip to content

Instantly share code, notes, and snippets.

View robinclart's full-sized avatar

Robin robinclart

View GitHub Profile
@robinclart
robinclart / convert-to-table.rb
Created April 16, 2020 08:33
Convert data from covid19 stats for Thailand into a tab separated list that can be imported into a spreasheet
require "excon"
require "json"
data = JSON.parse(Excon.get("https://covid19.th-stat.com/api/open/timeline").body)
timeline = data["Data"].reverse.take(60).map do |day|
[
day["Date"],
day["NewConfirmed"],
day["NewRecovered"],
@robinclart
robinclart / .Brewfile
Last active May 21, 2017 08:33
.Brewfile
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap 'ethereum/ethereum'
tap 'cockroachdb/cockroach'
cask '1password'
cask 'textmate'
cask 'dropbox'
cask 'spectacle'
@robinclart
robinclart / bot-holidays
Created May 3, 2017 07:13
A small script to parse the holiday dates from BOT website
#!/usr/bin/env ruby
require "mechanize"
require "nokogiri"
require "date"
require "json"
agent = Mechanize.new
page = agent.get("https://www.bot.or.th/English/FinancialInstitutions/FIholiday/Pages/2017.aspx")
@robinclart
robinclart / config
Last active January 11, 2017 04:24
.ssh/config
Host *
IdentitiesOnly yes
UseKeychain no
AddKeysToAgent no
Host git.omise.co
User git
IdentityFile ~/.ssh/git.omise.co/robin
Host github.com
@robinclart
robinclart / .tmux.conf
Last active January 8, 2017 13:51
.tmux.conf
set-option -g default-command "reattach-to-user-namespace -l fish"
# force a reload of the config file and display "~/.tmux.conf Reloaded!"
unbind r
bind r source-file ~/.tmux.conf \
# window splitting
bind | split-window -h
bind - split-window -v
@robinclart
robinclart / config.fish
Last active January 8, 2017 13:50
.config/fish/config.fish
set GOROOT /usr/local/opt/go/libexec
set GOPATH ~/src
set EDITOR 'mate -w'
set PATH ./bin ~/bin ~/.rbenv/shims $PATH $GOROOT/bin
alias m "mate"
alias mm "mate ."
alias gss "git status -sb"
alias gpo "git pull origin --tags"
alias gc "git checkout"
@robinclart
robinclart / .tm_properties
Created January 5, 2017 04:13
.tm_properties
invisiblesMap = "~ "
excludeDirectories = "{$excludeDirectories,tmp}"
include = "{$include,.gitignore,.env}"
@robinclart
robinclart / .gitconfig
Created January 5, 2017 04:06
.gitconfig
[core]
excludesfile = ~/.gitignore
[user]
name = Robin Clart
email = robin@omise.co
[alias]
pending = !git add -A && git commit -m pending
pop = !git reset --soft HEAD~1 && git reset
@robinclart
robinclart / .gemrc
Created January 5, 2017 04:02
.gemrc
---
gem: --no-ri --no-rdoc
@robinclart
robinclart / shells
Created January 5, 2017 03:30
etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh