Skip to content

Instantly share code, notes, and snippets.

View jasonmccallister's full-sized avatar

Jason McCallister jasonmccallister

View GitHub Profile
@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"
@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;
}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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.
@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
web:
image: php:7.0.7-apache
links:
- db:postgres
ports:
- 80:80
volumes:
- .:/var/www/html
db:
image: postgres:9.5.3
@jasonmccallister
jasonmccallister / .vimrc
Last active January 3, 2017 15:40
my .vimrc
" ---------------------------------------
" GENERAL CONFIG
" ---------------------------------------
set nocompatible
filetype off
syntax enable
" disable macvim save with cmd-s
macmenu &File.Save key=<nop>
@jasonmccallister
jasonmccallister / docker-swarm-install.sh
Last active January 21, 2018 23:00
Quick bash script to setup Docker and Docker Swarm on Ubuntu 16.04
#!/usr/bin/env bash
# O1 - BASIC USER AND SSH SETUP
# ask for the new username
read -p 'Enter your new username here: ' NEWUSER
# set the path for the user
USERSSHPATH=/home/$NEWUSER/.ssh
# creates the user, you will be promted for a password
adduser $NEWUSER && usermod -aG sudo $NEWUSER
<?php
namespace Tests\Feature;
use App\Make;
use App\User;
use App\Year;
use App\Listing;
use App\UserType;
use App\MakeModel;
FROM php:7.0-apache
MAINTAINER Jason McCallister <jason.mccallister@traderinteractive.com>
# arguments for the installation
ARG BLD_PKGS="libfreetype6-dev libjpeg62-turbo-dev libpng12-dev libicu-dev"
ARG PHP_EXTS="pdo pdo_mysql gd"
# install needed items (php extensions)
RUN apt-get update \