Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View teitei-tk's full-sized avatar
💭
I 💟 🍛

Yoshikatsu Higa teitei-tk

💭
I 💟 🍛
View GitHub Profile
@teitei-tk
teitei-tk / Dockerfile
Last active October 26, 2020 11:50
Next.js Multi Stage Build Dockerfile
FROM node:14-alpine as base
WORKDIR /app/js/base
COPY package.json .
COPY yarn.lock .
COPY tsconfig.json .
RUN yarn install
COPY . .
@teitei-tk
teitei-tk / Dockerfile
Created July 28, 2020 16:56
Next.js with Docker multi stage build
FROM node:12.18.2-alpine as builder
WORKDIR /app
COPY package.json .
COPY yarn.lock .
COPY tsconfig.json .
RUN yarn install --production
@teitei-tk
teitei-tk / file0.txt
Created November 12, 2018 04:56
Homebrewをアンインストールし、端末をクリーンな状態に戻し、インストールしたパッケージ群をRestoreする。 ref: https://qiita.com/teitei_tk/items/6cbe0e90a809b1a5ca19
$ brew bundle dump
@teitei-tk
teitei-tk / file0.txt
Created August 10, 2018 11:19
Railsのversion更新時に伴うactiverecord-session-storeの振る舞いについて ref: https://qiita.com/teitei_tk/items/098ea3b167c8e44ec9da
$ bin/rake db:sessions:clear
@teitei-tk
teitei-tk / Gemfile
Created July 6, 2018 03:43
Rails4からRails5へのテストケースでキーワード引数を機械的に一括変換する。 ref: https://qiita.com/teitei_tk/items/a95f6ec928b2b51559ad
+ gem 'rails5-spec-converter'
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();
# 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 ->
@teitei-tk
teitei-tk / gist:187a36cf01d50f15be1e
Created May 1, 2015 01:50
detect ios version number
<?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);
set nohud
set nosmoothscroll
set typelinkhints
let searchlimit = 100
let scrollstep = 200
@teitei-tk
teitei-tk / file0.txt
Created October 17, 2014 17:06
俺俺Gitのalias&ワンライナー集 ref: http://qiita.com/teitei_tk/items/699cef25a14db67ba8b7
[alias]
restart = reset --hard HEAD