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
[alias]
detect-branches = !git checkout $(git branch | peco)
@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();
import base64
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key, block_size=32):
self.bs = block_size
if len(key) >= len(str(block_size)):
self.key = key[:block_size]
else:
# 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 / requirements.txt
Created November 2, 2013 13:38
pip librarylist
Flask==0.6.1
IPy==0.81
Jinja2==2.7
MarkupSafe==0.18
PIL==1.1.7
Powerline==beta
Pygments==1.6
Twisted==12.0.0
Werkzeug==0.8.3
altgraph==0.9