Skip to content

Instantly share code, notes, and snippets.

@f440
f440 / Dockerfile
Last active March 25, 2020 05:00
docker, shell, ruby, signal
FROM alpine
RUN apk add --no-cache ruby
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/local/bin/dumb-init
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /tini
RUN chmod +x /tini
@f440
f440 / Dockerfile
Created December 15, 2019 07:35
docker image for awscli
FROM alpine:3.10
RUN apk --no-cache add \
python \
py-pip
RUN pip install --upgrade pip awscli s3cmd
RUN adduser -D aws
USER aws
@f440
f440 / rails.new.v5.2.3
Created July 29, 2019 07:36
rails new (v5.2.3)
Usage:
rails new APP_PATH [options]
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications)
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /usr/local/Cellar/ruby/2.6.3/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
@f440
f440 / rails.new.v6.0.0.rc2
Created July 29, 2019 07:26
rails new (v6.0.0.rc2)
Using --skip-bundle from /Users/fuse/.railsrc
Usage:
rails new APP_PATH [options]
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications)
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /usr/local/Cellar/ruby/2.6.3/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
" vim-plug {{{1
call plug#begin('~/.vim/plugged')
Plug 'xolox/vim-misc' | Plug 'xolox/vim-notes'
Plug 'powerman/vim-plugin-AnsiEsc', { 'on' : 'AnsiEsc' } " ansi escape sequences concealed, but highlighted as specified (conceal)
Plug 'godlygeek/tabular'
Plug 'junegunn/vim-easy-align'
Plug 'vim-scripts/VisIncr'
Plug 'kshenoy/vim-signature' " Plugin to toggle, display and navigate marks
Plug 'maxbrunsfeld/vim-yankstack'
@f440
f440 / main.go
Last active September 30, 2018 00:14
zsh's extended history file parser
package main
import (
"bufio"
"fmt"
"log"
"os"
"strconv"
"strings"
"time"
@f440
f440 / Memo.md
Last active June 15, 2018 14:53
systemd-networkd の設定 (Thinkpad T470s)

ネットワーク設定, ワイヤレス設定, WPA supplicant, systemd-networkd, systemd-resolved

# 以前作ったnetctlの設定を削除
sudo systemctl stop netctl-auto@wlp58s0.service
sudo systemctl disable netctl-auto@wlp58s0.service

sudo -e /etc/systemd/network/wired.network
    
    [Match]
@f440
f440 / PKGBUILD
Created February 18, 2018 15:12
PKGBUILD for xkeysnail
# Maintainer: f440 <freq440@gmail.com>
pkgname=python-xkeysnail
pkgver=0.0.1
pkgrel=1
pkgdesc="Yet another keyboard remapping tool for X environment"
arch=('any')
url="https://github.com/mooz/xkeysnail"
license=('GPL')
groups=()
depends=('python')
@f440
f440 / karabiner.json
Last active February 11, 2018 06:15
control-[ to escape, control-m to return
{
"description": "control-[ to escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": { "mandatory": [ "control" ] }
},
"to": [
@f440
f440 / Dockerfile
Last active January 4, 2018 02:56
use_node doesn't work at all #319 https://github.com/direnv/direnv/issues/319
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get install -y git curl
# RUN apt-get install -y curl
RUN curl -o - https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
RUN curl -L -o direnv https://github.com/direnv/direnv/releases/download/v2.14.0/direnv.linux-amd64
RUN install direnv /usr/local/bin/