Skip to content

Instantly share code, notes, and snippets.

@ohshhh
ohshhh / bash_aliases
Last active January 15, 2016 12:38 — forked from frdmn/bash_aliases
Brew lamp configs
alias nginx.start='sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.stop='sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist'
alias nginx.restart='nginx.stop && nginx.start'
alias php-fpm.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist"
alias php-fpm.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist"
alias php-fpm.restart='php-fpm.stop && php-fpm.start'
alias mysql.start="launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.stop="launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist"
alias mysql.restart='mysql.stop && mysql.start'
alias nginx.logs.error='tail -250f /usr/local/etc/nginx/logs/error.log'
@ohshhh
ohshhh / uninstall_homebrew.sh
Last active January 15, 2016 12:37 — forked from mxcl/uninstall_homebrew.sh
Brew uninstall
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@ohshhh
ohshhh / gist:5bce1d4d2c6cf90aaa3f
Last active August 29, 2015 14:08
centos ruby 1.9.3 p547 instal
# Enable EPEL repo
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
or
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Install build prereqs
yum -y groupinstall "Development Tools"
yum -y install libyaml libyaml-devel readline-devel ncurses-devel gdbm-devel tcl-devel openssl-devel db4-devel libffi-devel ImageMagick-devel libuuid-devel zlib-devel curl-devel openssl-devel httpd-devel apr-devel mysql-devel
@ohshhh
ohshhh / gist:f1f31a47daa8dbbca786
Created November 18, 2014 16:03
redis install, centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@ohshhh
ohshhh / graphite.md
Last active January 15, 2016 00:41 — forked from relaxdiego/graphite.md
Install graphite on OS X Mavericks

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

@ohshhh
ohshhh / multiple_ssh_setting.md
Created December 19, 2015 01:39 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@ohshhh
ohshhh / Sonata admin bundle versions compatibility
Last active January 15, 2016 00:40
Sonata admin bundle versions compatibility
https://docs.google.com/spreadsheets/d/1fSpS10nzlEj9HE-GdZ-BHcxileEzHwRIzLlNfdNtZ2k/edit?pli=1#gid=0
@ohshhh
ohshhh / osx_ramdisk.sh
Last active November 9, 2016 13:10 — forked from jnschulze/osx_ramdisk.sh
RamDisk Usage OSX
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
@ohshhh
ohshhh / symfony 3 bundles status
Created January 26, 2016 12:05
Symfony 3 bundles status
https://docs.google.com/spreadsheets/d/1GOxJ2lNpLxN12YyZ87Bhsxb0iLAQ7e4UDZbJSly8Sy8/edit#gid=0