Skip to content

Instantly share code, notes, and snippets.


teitei-tk teitei-tk

Block or report user

Report or block teitei-tk

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
teitei-tk / file0.txt
Created Nov 12, 2018
Homebrewをアンインストールし、端末をクリーンな状態に戻し、インストールしたパッケージ群をRestoreする。 ref:
View file0.txt
$ brew bundle dump
teitei-tk / file0.txt
Created Aug 10, 2018
Railsのversion更新時に伴うactiverecord-session-storeの振る舞いについて ref:
View file0.txt
$ bin/rake db:sessions:clear
teitei-tk / Gemfile
Created Jul 6, 2018
Rails4からRails5へのテストケースでキーワード引数を機械的に一括変換する。 ref:
View Gemfile
+ gem 'rails5-spec-converter'
View printPdf.js
import { writeFile } from 'fs';
import Chaldeas from 'chaldeas';
async function main() {
// EntryPointのClassを生成。
const chaldeas =;
try {
// chromeの立ち上げと、Debugging Protocolへの接続
const protocol = await chaldeas.fetchProtocol();
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
View gist:187a36cf01d50f15be1e
$txt = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4';
$reg = '/iPhone OS ([0-9]+)_([0-9]+)/i';
preg_match($reg, $txt, $result);
$str_version = $result[1] . '.' . $result[2]; //This variable should now contain : 4.0
View gist-file0.txt
set nohud
set nosmoothscroll
set typelinkhints
let searchlimit = 100
let scrollstep = 200
View file0.txt
restart = reset --hard HEAD
teitei-tk /
Created Sep 14, 2014
CentOS上でFlaskをpython3.4、Gunicorn + Nginxで動かす。 ref:
from flask import Flask
app = Flask(__name__)
def hello():
return "Hello World!"
teitei-tk / gist:506a526bd7c55b49befd
Created Sep 10, 2014
delete git all local branches
View gist:506a526bd7c55b49befd
git branch | awk "{print$1}" | xargs git branch -D
You can’t perform that action at this time.