Skip to content

Instantly share code, notes, and snippets.

View kiasaki's full-sized avatar
🚧
Building many things

kiasaki kiasaki

🚧
Building many things
View GitHub Profile
@kiasaki
kiasaki / Preferences.sublime-settings
Last active December 18, 2015 01:19
Sublime settings
{
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"drag_text": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
@kiasaki
kiasaki / .vimrc
Last active December 21, 2015 19:20
My vimrc
" Frederic's .vimrc
" https://github.com/kiasaki/dotfiles
call pathogen#infect()
" Behaviors
syntax on
set hidden
set nocompatible " no vi support
set clipboard=unnamed " use mac clipboard
set ttyfast " optimize for fast terminal connections

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kiasaki
kiasaki / tkn
Created April 28, 2014 14:09
Terminal Keynote Presentation
#!/usr/bin/env ruby
# encoding: utf-8
# Original project: https://github.com/fxn/tkn
Encoding.default_internal = "UTF-8"
require 'io/console'
require 'active_support/core_ext/string/strip'
require 'pygments'
@kiasaki
kiasaki / RailsAppGenerator.sh
Created April 29, 2014 12:33
RailsApps generator
rails new <app-name> -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
@kiasaki
kiasaki / post-receive
Last active August 29, 2015 14:03
post-receive hook VPS
#!/bin/sh
echo ""
echo "-----"
echo "Transfering ..."
GIT_DIR=/home/<username>/repo/<app>.git
WWW_DIR=/var/www/<app>/current
git --work-tree=$WWW_DIR --git-dir=$GIT_DIR checkout -f
server {
listen 80;
server_name <fqdn>;
rewrite ^ https://$server_name$request_uri? permanent;
error_log /var/log/nginx/<app>-error.log;
access_log /var/log/nginx/<app>-access.log;
}
@kiasaki
kiasaki / README.md
Last active August 29, 2015 14:03
vps-linux-nginx-postgres-php-stack

VPS LNPP Stack setup

Note to self, after fiddling with the same errors again and again while setting this up, I'm writing down what I repeat every time I setup a new droplet @ digitalocean.

1: Droplet creation

Create a new droplet @ cloud.digitalocean.com and, when created, copy the IP address to setup a domain name pointing to it right away.

I go at https://www.hover.com/domains and add an A record, I'll assume dev.domain.com in this guide.

@kiasaki
kiasaki / .env
Created August 26, 2014 22:14
Basic Go exports
export GOROOT=$HOME/go
export GOPATH=$HOME/code/go
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:$GOPATH/bin
export PATH=$HOME/goae:$PATH
export wd=$GOPATH/src/github.com/kiasaki
@kiasaki
kiasaki / gist:f36676d0edb7bc4173a6
Last active August 29, 2015 14:05
Emacs Cheat Sheet
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line