Skip to content

Instantly share code, notes, and snippets.

@albertgrala
albertgrala / swap.sh
Last active August 29, 2015 14:17 — forked from peterchester/swap.sh
#/bin/sh
# Creates a 1gb swap image.
# @see https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps
if [ -f /var/swap.img ]; then
echo "Swap file already exists."
else
touch /var/swap.img
chmod 600 /var/swap.img
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@albertgrala
albertgrala / .vimrc
Created October 6, 2013 18:25 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@albertgrala
albertgrala / js_array_iteration.js
Created January 28, 2013 15:36
Javascript array iteration , optimized technique
for ( var i = 0, len = list.length; i < len; i++ ) {
// do some stuff with the item list[i]
}
@albertgrala
albertgrala / dev.md
Created December 20, 2012 11:39
Style guides, best practices ,quick references, specifications
@albertgrala
albertgrala / bookmarks_dev.md
Created December 18, 2012 14:21
Blogs I follow, listed in its main category in alphabetical order. Specific topics In parentheses.
@albertgrala
albertgrala / useful_dev_posts.md
Created December 18, 2012 13:46
Useful posts and resources
@albertgrala
albertgrala / wp-config-enhanced.php
Created December 16, 2012 18:26
Ehanced version of wp-config
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the