Skip to content

Instantly share code, notes, and snippets.

View jasonmccallister's full-sized avatar

Jason McCallister jasonmccallister

View GitHub Profile
@jasonmccallister
jasonmccallister / curl_script.sh
Created April 1, 2016 04:08
Bash script that curls each URL from a text file.
while read p; do
curl -I $p
done <file_with_urls.txt
@jasonmccallister
jasonmccallister / my.conf
Created March 16, 2016 22:14
Craft CMS my.conf for Laravel Homestead
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jasonmccallister
jasonmccallister / nginx_app.conf
Created December 14, 2015 05:11
Craft Heroku Nginx Config
server {
http {
location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
# rewrite all to index.php
rewrite ^(.*)$ /index.php?p=$1 last;
}
@jasonmccallister
jasonmccallister / config.rb
Created July 31, 2015 20:14
compass configuration
# INSTALLATION
# 1. gem install compass-notify
# 2. bower install
# 3. compass watch -e production // or developement
# Require any additional compass plugins here.
require 'compass-notify'
add_import_path "resources/bower_components/foundation/scss"
vmup()
{
cd ~/Homestead;
vagrant up;
cd ~/Code;
}
vmssh() {
cd ~/Homestead && vagrant ssh;
}
<?php
/**
* Register site routes.
*
* @return array
*/
public function registerSiteRoutes()
{
return array(
@jasonmccallister
jasonmccallister / composer.json
Created June 16, 2015 18:27
Composer configuration for building Craft websites on Heroku
{
"require": {
"php": "~5.6.9",
"ext-gd": "*",
"ext-iconv": "*",
"ext-imagick": "*",
"ext-mbstring": "*",
"ext-newrelic": "*",
"ext-redis": "*"
}
@jasonmccallister
jasonmccallister / move-known-hosts.sh
Last active August 29, 2015 14:15
Remove known_hosts
mv ~/.ssh/known_hosts ~/.ssh/old_hosts && touch ~/.ssh/known_hosts
@jasonmccallister
jasonmccallister / .gitignore
Created February 3, 2015 05:25
Laravel 5 on Heroku Gitignore
/vendor
.env
gulpfile.js
package.json