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
teitei-tk / file0.txt
Created Nov 12, 2018
Homebrewをアンインストールし、端末をクリーンな状態に戻し、インストールしたパッケージ群をRestoreする。 ref: https://qiita.com/teitei_tk/items/6cbe0e90a809b1a5ca19
View file0.txt
$ brew bundle dump
@teitei-tk
teitei-tk / file0.txt
Created Aug 10, 2018
Railsのversion更新時に伴うactiverecord-session-storeの振る舞いについて ref: https://qiita.com/teitei_tk/items/098ea3b167c8e44ec9da
View file0.txt
$ bin/rake db:sessions:clear
@teitei-tk
teitei-tk / Gemfile
Created Jul 6, 2018
Rails4からRails5へのテストケースでキーワード引数を機械的に一括変換する。 ref: https://qiita.com/teitei_tk/items/a95f6ec928b2b51559ad
View Gemfile
+ gem 'rails5-spec-converter'
View printPdf.js
import { writeFile } from 'fs';
import Chaldeas from 'chaldeas';
async function main() {
// EntryPointのClassを生成。
const chaldeas = Chaldeas.new();
try {
// chromeの立ち上げと、Debugging Protocolへの接続
const protocol = await chaldeas.fetchProtocol();
View init.coffee
# 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
<?php
$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
var_dump($result);
View gist-file0.txt
set nohud
set nosmoothscroll
set typelinkhints
let searchlimit = 100
let scrollstep = 200
View file0.txt
[alias]
restart = reset --hard HEAD
@teitei-tk
teitei-tk / app.py
Created Sep 14, 2014
CentOS上でFlaskをpython3.4、Gunicorn + Nginxで動かす。 ref: http://qiita.com/teitei_tk/items/b223eeef1286a9fd7486
View app.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@teitei-tk
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.