Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
get used to run always psql with the `E` option. | |
psql -E $DATABASE_URL | |
Whenever you run \ commands like \d table1 you see the queries psql is running. | |
It's really useful to learn about postgresql internals everyday. | |
eg: | |
\d schools | |
******** QUERY ********** | |
SELECT pubname |
export http_proxy=$HTTP_PROXY https_proxy=$HTTP_PROXY ftp_proxy=$HTTP_PROXY | |
wget http://ftpmirror.gnu.org/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz | |
tar xf gcc-4.9.2.tar.gz | |
mkdir build-gcc | |
$ cd build-gcc | |
$ ../gcc-4.9.2/configure --program-suffix=-4.9.2 --enable-languages=c,c++ --disable-bootstrap --disable-shared | |
make -j4 | |
make install | |
cd .. |
defmodule MyModule.Router do | |
@moduledoc """ | |
Http Entry Point | |
""" | |
use Plug.Router | |
use Plug.ErrorHandler | |
plug Plug.Logger | |
plug :match |
defmodule MyApp do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
dispatch: dispatch | |
]) |
require 'mina/git' | |
set :domain, 'your_domain' | |
set :deploy_to, 'your_path_on_server' | |
set :repository, 'your_git' | |
set :branch, 'master' | |
set :app_name, 'your_app_name' | |
set :shared_paths, ['log'] |
" vim-plug: Vim plugin manager | |
" ============================ | |
" | |
" Download plug.vim and put it in ~/.vim/autoload | |
" | |
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" | |
" Edit your .vimrc | |
" |
" Basic stuff, leader to space, remap esc, saving files | |
:let mapleader = " " | |
:nnoremap <leader>ev :vsplit $MYVIMRC<cr> | |
:imap jk <Esc>l | |
:nnoremap <Leader>s :update<CR> | |
:nnoremap <Leader>x :x<CR> | |
:nnoremap <Leader>q :bd<CR> | |
:nnoremap <Leader><Leader> :FZF<CR> | |
:nnoremap <Leader>p :FZF<CR> | |
:nnoremap <Up> <nop> |
env_hash = Hash[File.read("env.sh").scan(/(.*?)="?(.*)"?$/)] | |
ENV["POSTGRESQL_URL"] = env_hash.fetch('DB_TEST') | |
require_relative '../main' | |
module Settings | |
def self.testing? | |
true | |
end | |
end | |
def db_test(title, &block) |
var all = document.getElementsByTagName("*"); | |
for (var i=0, max=all.length; i < max; i++) { | |
(all[i]).contentEditable = "true"; | |
} |