Skip to content

Instantly share code, notes, and snippets.

@f440
f440 / Dockerfile
Last active Mar 25, 2020
docker, shell, ruby, signal
View Dockerfile
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 Dec 15, 2019
docker image for awscli
View Dockerfile
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 Jul 29, 2019
rails new (v5.2.3)
View 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 Jul 29, 2019
rails new (v6.0.0.rc2)
View 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)
View vimrc
" 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 Sep 30, 2018
zsh's extended history file parser
View main.go
package main
import (
"bufio"
"fmt"
"log"
"os"
"strconv"
"strings"
"time"
@f440
f440 / Memo.md
Last active Jun 15, 2018
systemd-networkd の設定 (Thinkpad T470s)
View Memo.md

ネットワーク設定, ワイヤレス設定, 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 Feb 18, 2018
PKGBUILD for xkeysnail
View PKGBUILD
# 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 Feb 11, 2018
control-[ to escape, control-m to return
View karabiner.json
{
"description": "control-[ to escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": { "mandatory": [ "control" ] }
},
"to": [
View Dockerfile
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/
You can’t perform that action at this time.