Skip to content

Instantly share code, notes, and snippets.

@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/
pkgname=notes
pkgver=0.4.0
pkgrel=1
pkgdesc="Simple delightful note taking, with more unix and less lock-in."
arch=('any')
url="https://github.com/pimterry/notes"
license=('MIT')
md5sums=('c93c205640561c83cf31f8d25286b908')
package() {
@f440
f440 / Safari Bookmarks.html
Created January 3, 2017 05:15
safari's default bookmark
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<HTML>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<Title>Bookmarks</Title>
<H1>Bookmarks</H1>
<DT><H3 FOLDED>Favorites</H3>
<DL><p>
<DT><A HREF="http://www.apple.com/">Apple</A>
<DT><A HREF="https://www.icloud.com/">iCloud</A>
<DT><A HREF="https://www.facebook.com/">Facebook</A>
@f440
f440 / Makefile
Last active February 27, 2017 00:26
Makefile for docker project
NS ?= $(shell whoami)
REPO ?= $(shell basename $(shell pwd))
VERSION ?= latest
CONTAINER = $(NS)-$(REPO)
.PHONY: build
build:
docker build -t $(NS)/$(REPO):$(VERSION) .
@f440
f440 / openresty-ubuntu-install.sh
Last active October 21, 2016 14:19 — forked from alex-roman/openresty-ubuntu-install.sh
Easy install openresty (used and tested on Ubuntu 14.04, 15.10 and 16.04)
#!/bin/bash
# apt-get -y update
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev
wget -c https://openresty.org/download/openresty-1.9.15.1.tar.gz
tar zxvf openresty-1.9.15.1.tar.gz
cd openresty-1.9.15.1
./configure \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
@f440
f440 / memocurial.service
Created October 13, 2016 14:47
systemd setting for memocurial
[Unit]
Description=Memocurial
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=/usr/bin/docker run -v /var/lib/memocurial/var:/app/var --entrypoint "bin/buildout" f440/memocurial
ExecStartPre=/usr/bin/docker run -v /var/lib/memocurial/var:/app/var f440/memocurial init-db
ExecStart=/usr/bin/docker run -p 5000:5000 --name %n -v /var/lib/memocurial/var:/app/var f440/memocurial runserver -h 0.0.0.0
@f440
f440 / README
Last active February 23, 2016 11:40
aglio test
# aglio test
## Install
npm install
./node_modules/.bin/aglio -i test.apib -o test.html
@f440
f440 / edit_model.rb
Last active October 23, 2015 06:15
Redis で Edit & Undo
#!/usr/bin/env ruby
require 'redis'
# 初期化
# edit = EditModel(12345)
#
# 編集
# edit.commit(serialized_object)
#
@f440
f440 / info.apatheia.RestartNotifyd.plist
Last active October 16, 2015 03:23
Kill notifyd as workaround for El capitan problem https://github.com/tmux/tmux/issues/108
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>info.apatheia.RestartNotifyd</string>
<key>ProgramArguments</key>
<array>
<string>pkill</string>
<string>notifyd</string>