Skip to content

Instantly share code, notes, and snippets.

View jasonmccallister's full-sized avatar

Jason McCallister jasonmccallister

View GitHub Profile
#!/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'
@jasonmccallister
jasonmccallister / clearfix.twig
Created February 26, 2014 05:12
Used in a Craft/Twig for loop to add a clear fix div after three entries.
{% if loop.index is divisibleby(3) %}
<div class="clearfix"></div>
{% endif %}
@jasonmccallister
jasonmccallister / cheatsheet
Created February 3, 2014 16:16
Craft Plugin Developement - Forms Cheatsheet
#Craft Plugin Developement - Forms Cheatsheet
My quick reference for working with forms while developing plugins for Craft.
###checkbox
* id
* class
* name
* checked
@jasonmccallister
jasonmccallister / db.php
Created October 26, 2013 20:23
My Craft db.php configuration for AppFog.com
<?php
/**
* Database Configuration
*
* All of your system's database configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/db.php
*/
if ($_SERVER['HTTP_HOST'] == 'local.domainname.com') {
@jasonmccallister
jasonmccallister / appfog-php-apache-information
Created October 14, 2013 23:48
PHP Info and Apache Environment information for AppFog.
# Apache Environment Variables
The following environment variables are available through phpinfo().
* VCAP_SERVICES
* HTTP_HOST
* HTTP_X_FORWARDED_FOR
* HTTP_CONNECTION
* HTTP_ACCEPT
* HTTP_ACCEPT_ENCODING