Skip to content

Instantly share code, notes, and snippets.

View jasonmccallister's full-sized avatar

Jason McCallister jasonmccallister

View GitHub Profile
@jasonmccallister
jasonmccallister / .zshrc
Last active August 29, 2015 14:13
Dotfiles
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Theme
ZSH_THEME="frisk"
# Custom plugins
plugins=(git ruby rails)
# User configuration
<?php
craft()->path->getLicenseKeyPath()
@jasonmccallister
jasonmccallister / styles.less
Created June 10, 2014 22:13
My styles.less for my Atom editor. Uses Spacegray Dark for the UI and syntax theme.
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@jasonmccallister
jasonmccallister / base.sh
Last active August 29, 2015 14:00
CentOS - Install scripts for Digital Ocean and Puppet Enterprise
# install the base packages
yum install nano git
@jasonmccallister
jasonmccallister / baseinstall.sh
Created May 4, 2014 18:19
CentOS - Base install script
# install only the base packages
yum install nano git
@jasonmccallister
jasonmccallister / firewall.sh
Created May 4, 2014 18:18
Bash file to quickly install CentOS firewall rules
# flush all rules
iptables -F
# block null packets
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
# block syn-flood attacks
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
# block XMAS packets
@jasonmccallister
jasonmccallister / nginx.repo
Created March 23, 2014 23:51
CentOS Nginx Rep for vagrant
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6.5/$basearch/
gpgcheck=0
enabled=1
@jasonmccallister
jasonmccallister / ngxhost.sh
Last active August 29, 2015 13:57 — forked from fideloper/ngxhost.sh
My custom ngxhost.sh for vagrant. Forked from https://gist.github.com/fideloper/9063376
#!/usr/bin/env bash
if [ $EUID -ne 0 ]; then
echo "You must be root: \"sudo ngxvhost\""
exit 1
fi
# May need to run this as sudo!
# I have it in /usr/local/bin and run command 'ngxvhost' from anywhere, using sudo.
# Don't throw any errors for missing favicons and don't display them in the logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
# Don't log missing robots or show them in the nginx logs
location = /robots.txt {
allow all;
log_not_found off;
@jasonmccallister
jasonmccallister / QuickPostWidget.php
Created March 15, 2014 01:31
Modify getTitle in craft/app/widgets/QuickPostWidget.php to display the section title in lower case to match the widget title text.
public function getTitle()
{
if (craft()->hasPackage(CraftPackage::PublishPro))
{
$section = $this->_getSection();
if ($section)
{
return Craft::t('Post a new {section} entry', array('section' => strtolower($section->name)));
}