Skip to content

Instantly share code, notes, and snippets.

View mokxter's full-sized avatar
:shipit:
Ship

Ian Cristopher Buena mokxter

:shipit:
Ship
View GitHub Profile
@mokxter
mokxter / .vimrc
Created February 15, 2017 15:36
My Vim RC
call pathogen#infect()
filetype plugin on
filetype plugin indent on
filetype indent on
" =============================================
set hidden
" =============================================
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
@mokxter
mokxter / secure copy.md
Last active February 23, 2017 06:23
How to use scp (secure copy)

To copy from the server

scp IP@USERNAME:REMOTEDIRECTORY LOCALDESTINATION
scp 172.0.0.1@ubuntu:~/filename.fileext ~/Download

/**
 * If you're using a pem file
 */

scp -i ~/.ssh/filename.pem USERNAME@IP/DOMAIN:REMOTEDIRECTORY LOCALDESTINATION

@mokxter
mokxter / compression.md
Last active December 12, 2016 04:33
Compressing files using tar

To compress using tar:

tar cjvf filename.tbz [files]

To uncompress:

tar xjvf filename.tbz

@mokxter
mokxter / fix_siera.md
Last active December 8, 2016 07:39
Fix for fail capistrano deployment in OS Siera

This is just a gist for taking note about the issue with capistrano when you upgrade to OS Sierra

The straight forward solution is to add all keys to ssh

ssh-add -A

But this doesn't persist after a reboot so we can include it to our .bash_profile like this

ssh-add -A 2>/dev/null;

@mokxter
mokxter / install-git-completion.sh
Created October 4, 2016 04:41 — forked from johngibb/install-git-completion.sh
Mac OS X - Install Git Completion
URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@mokxter
mokxter / Node and NPM installation.md
Last active December 8, 2016 07:29
Installing node and npm properly

This is just a personal gist for installing node and npm

Install nodejs from the repo / package manager of your choice

  1. $ sudo apt-get install nodejs

When you install node in ubuntu, it doesn't install as node rather it install as nodejs so we need to make a symbolic link from nodejs to node

  1. $ sudo ln -s /usr/bin/nodejs /usr/bin/node