Skip to content

Instantly share code, notes, and snippets.

View khalib's full-sized avatar

Caleb Whang khalib

  • San Francisco Giants
  • San Francisco, CA
View GitHub Profile
<?php
// Hook theme.
function tlr_learning_rating_theme() {
return array(
'learning_rating_rate' => array(
'template' => 'templates/block_learning_rating_rate',
),
);
}
?>
@khalib
khalib / Graphite Nginx Virtual Host
Created January 9, 2014 18:57
Nginx config template for Graphite as a virtual host
server {
listen 127.0.0.1:80;
server_name local.graphite.org;
access_log /usr/local/var/log/nginx/graphite.access.log;
error_log /usr/local/var/log/nginx/graphite.error.log;
root /var/www/graphite.org/source/www/docroot;
location / {
try_files $uri @rewrite;
}
@khalib
khalib / Useful Compass Commands
Last active January 2, 2016 13:19
Useful Compass Commands
# Install compass
gem update --system
gem install compass
# Force compile all SASS files.
compass compile -e production --force
# Clear registry/memcache on Acquia
echo -e "flush_all\r\nquit" | nc `hostname -s` 11211
@khalib
khalib / Mac OSX Django install
Last active January 2, 2016 11:19
Mac OSX Django install
# Install python
brew install python
# Add python to path.
# export PATH=/usr/local/share/python:$PATH
# Install virtualenv.
pip install virtualenv
# Create virtual environment for the project.
@khalib
khalib / cms_install.sh
Last active October 3, 2017 09:26
MNPP: Mac/Nginx/Percona-MySQL/PHP install via Homebrew
# Install Xcode
xcode-select --install
# Install Homebrew.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update
# Install git.
brew install git
@khalib
khalib / Mac OSX Finder View Hidden Files
Created January 7, 2014 00:21
View Hidden Files In OSX Finder
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder