Skip to content

Instantly share code, notes, and snippets.

View dnpp73's full-sized avatar

Yusuke SUGAMIYA dnpp73

View GitHub Profile
#!/usr/bin/env ruby
require 'Twitter'
require 'yaml'
class Ofuton
def self.load_yaml(yaml_path)
base_directory = File.dirname(File.expand_path(__FILE__))
YAML.load_file(base_directory + '/' + yaml_path)
end
@dnpp73
dnpp73 / tsrm.sh
Last active December 19, 2015 01:18
#!/bin/bash
SJIS_HTMLS=`find . -type f -name "*.htm*"`
for SJIS_HTML in $SJIS_HTMLS; do
echo $SJIS_HTML
mv $SJIS_HTML "${SJIS_HTML}_bak"
nkf -w8 "${SJIS_HTML}_bak" >> $SJIS_HTML
done
@dnpp73
dnpp73 / draft.txt
Last active December 21, 2015 08:09
メンテナンス性の高い iOS アプリを書こう
下書きの殴り書き
あとで清書してタイトル釣り気味にしつつ、書き出しの序文で「これ読んで「知らなかった!」「勉強になる」とかコメント付けたりはてブする人間とは一緒に仕事出来る気がしない」みたいな煽り文句付けたい
---
ググれ
でも情報にノイズが多い
日本語のブログ記事みたいなの、はてブ系や自分のハンドルネームのドメインで運用してるもの以外、アメブロとかそういうのに書いてるのは信用しない方がいい場合が多い
@dnpp73
dnpp73 / install.sh
Last active March 29, 2019 08:10
rbenv_ruby_install
#!/usr/bin/env bash
set -x # tell sh to display commands before execution
test -s "$HOME/.gemrc" && cat "$HOME/.gemrc"
test -s "$HOME/.bundle/config" && cat "$HOME/.bundle/config"
VERSIONS=("2.3.0" "2.3.3" "2.5.0" "2.5.1" "2.5.2" "2.5.3" "2.5.4" "2.5.5" "2.6.0" "2.6.1" "2.6.2")
#!/bin/bash
# place this shell script to
# ./
# ├── bin/
# │   └── ibdesignable-workaround.sh
# └── YourGreatApp.xcodeproj
set -euo pipefail