Skip to content

Instantly share code, notes, and snippets.

View joshuaadrian's full-sized avatar

Joshua Adrian joshuaadrian

View GitHub Profile
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
var length = methods.length;
@joshuaadrian
joshuaadrian / GIT Global Config
Created October 11, 2014 13:47
In terminal access this file with - vim ~/.gitconfig
[user]
name = Your Name
email = [email protected]
[alias]
co = checkout
ci = commit -am
br = checkout -b
s = status -s
r = remote -v
lg = log --oneline --decorate --all --graph
# change to postgres user and open psql prompt
sudo -u postgres psql postgres
# list databases
postgres=# \l
# list roles
postgres=# \du
# create role
clone down the Rails Vagrant Box https://github.com/railsmn/railsmn-dev-box and follow instructions.
alter rails version to desired in gemfile.
add gem "slim-rails" to gemfile and then bundle install.
@joshuaadrian
joshuaadrian / Terminal Octal Permissions
Created August 18, 2014 15:20
Octal permissions view of file/directory
stat -f %A
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
# Web server setup... SSH Keys... You can use ssh keys to log into the server without a password. I assume you have already generated your keys.
Open you public key at ~/id_rsa.pub, and copy it.
On the server, add your key to ~/.ssh/authorized_keys.
# On the web server, initialize an empty Git repository. First SSH into the server, then go to the website’s root directory, and run:
$ git init
# Suppress git receive error... Add this to the server’s .git/config file to suppress an error when it receives a push:
[receive]
@joshuaadrian
joshuaadrian / SASS Grid System
Last active August 29, 2015 14:01
Simple SASS grid system meant to be light weight and easy to use
/************************************************************************/
/* GRID VARIABLES
/************************************************************************/
$grid-gutter-width : 15px;
$grid-column-amount : 12;
$grid-large-breakpoint : 1200px;
$grid-medium-breakpoint : 992px;
$grid-small-breakpoint : 768px;
$languages = array(
'Afrikanns',
'Albanian',
'Arabic',
'Armenian',
'Basque ',
'Bengali',
'Bulgarian ',
'Catalan',
'Cambodian',
$countries = array(
"Afghanistan",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",
"Antigua and Barbuda",