Skip to content

Instantly share code, notes, and snippets.

var gulp = require('gulp');
var compass = require('gulp-compass');
var prefix = require('gulp-autoprefixer');
var livereload = require('gulp-livereload');
gulp.task('styles', function() {
return gulp.src('styles/*.scss')
.pipe(compass({
css: '.',
sass: 'styles',
@josh-taylor
josh-taylor / httpd-vhosts.conf
Last active December 30, 2015 00:39
My VirtualDocumentRoot setup
<IfModule dir_module>
DirectoryIndex index.html default.html index.php
</IfModule>
<IfModule mime_module>
AddHandler php5-script .phtml
AddHandler php5-script .php
</IfModule>
<VirtualHost *:80>
@josh-taylor
josh-taylor / .bash_profile
Last active December 21, 2015 10:29
My PS1 that displays the current branch in red
color_enabled() {
test -x /usr/bin/tput
}
BRANCH_FORMAT=$(color_enabled && tput setaf 2)
DIR_FORMAT=$(color_enabled && tput setaf 6)
RESET_FORMAT=$(color_enabled && tput sgr0)
function git_info() {
git rev-parse --is-inside-work-tree &>/dev/null || return
@josh-taylor
josh-taylor / .bash_profile
Created July 31, 2013 08:01
Bash function so that I can change directory to any vhost using a short command
function s {
cd /Users/Josh/Server/vhosts/$1.dev/httpdocs
}
@josh-taylor
josh-taylor / functions.php
Last active December 18, 2015 02:49
Changes the placeholder text for custom post types.
<?php
if (!function_exists('get_input_text')):
function get_input_text($input) {
global $post_type;
if (is_admin() && $input == 'Enter title here') {
switch ($post_type) {
case 'my_post_type':
return 'Enter full name here';
@josh-taylor
josh-taylor / git-archive-patch.sh
Last active October 21, 2023 08:50
Creates an archive of all files changed in a git repository since a given commit.
#!/bin/bash
# Explains how to use the script
usage()
{
cat << EOF
usage: $0 options
$0 -o output_file.zip commit_from [commit_to]