Skip to content

Instantly share code, notes, and snippets.

@jancuk
jancuk / profile
Created January 19, 2016 15:50
profile
#CLICOLOR=1
#PS1="\[\e[1;32m\][\u@\h \W]\$\[\e[0m\]"
alias ..='cd ..'
alias reload='. ~/.bash_profile'
# ls
alias ls="ls -FG"
alias l="ls -lAh"
" Plugins are managed by Vundle. Once VIM is open run :BundleInstall to
" install plugins.
" Plugins requiring no additional configuration or keymaps
Bundle "git://github.com/tpope/vim-git.git"
Bundle "git://github.com/altercation/vim-colors-solarized.git"
Bundle "git://github.com/tpope/vim-endwise.git"
Bundle "git://github.com/tpope/vim-fugitive.git"
Bundle "git://github.com/tpope/vim-haml.git"
Bundle "git://github.com/pangloss/vim-javascript.git"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
unbind C-b
set -g prefix `
bind-key ` send-prefix
"python from powerline.vim import setup as powerline_setup
"python powerline_setup()
"python del powerline_setup
filetype on
" bring in the bundles for mac and windows
set rtp+=~/vimfiles/vundle.git/
set rtp+=~/.vim/vundle.git/
" au BufNewFile,BufRead *.rs set filetype=rust
autocmd FileType * set tabstop=2|set shiftwidth=2|set expandtab
@jancuk
jancuk / install
Created January 18, 2016 10:37
install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install rbenv ruby-build
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 2.2.3
git config --global color.ui true
git config --global user.name "YOUR NAME"
@jancuk
jancuk / slim.conf
Created December 2, 2015 07:21
nginx for slim framework
server {
listen 80;
server_name apites.com;
root /home/azhar/Learning/OSS/test_layout/slim-boilerplate/public;
index index.html index.htm index.php;
access_log /var/log/nginx/dynamite_log.log;
error_log /var/log/nginx/dynamite_error_log.log;
#!/bin/bash
declare -r TRUE=0
declare -r FALSE=1
# takes a string and returns true if it seems to represent "yes"
function isYes() {
local x=$1
[ $x = "y" ] && echo $TRUE; return
[ $x = "Y" ] && echo $TRUE; return
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.1.7
rvm use 2.1.7 --default
ruby -v
upstream api {
server unix:/Users/azhar/code/fighting/puma_s/tmp/sockets/api.sock fail_timeout=0;
}
server{
listen 80;
server_name pumaa.com;
error_log /var/log/nginx/nginx_error.log;
# location /doc {
#!/usr/bin/env puma
basedir = '/Users/azhar/code/fighting/puma_s'
directory "#{basedir}"
environment 'development'
daemonize true
bind "unix://#{basedir}/tmp/sockets/api_indomaret.sock"
pidfile "#{basedir}/tmp/pid"
state_path "#{basedir}/tmp/state"
stdout_redirect 'log/puma.log', 'log/puma_err.log'