Skip to content

Instantly share code, notes, and snippets.

@calebbrewer
calebbrewer / gruntfile.js
Created May 28, 2013 15:33
Grunt file for: Preprocessing sass/compass Watching for changes in the sass/compass file minifying js and sass files concatenating js files
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css',
environment: 'production'
}
@calebbrewer
calebbrewer / Gitignore for wordpress theme dev.
Created May 27, 2013 20:13
Ignore everything except for the gitignore file and the themes directories. I made this because I tried others that used the ! logic, but they didn't work right for me.
#For wordpress theme dev.
#Ignore everything except for the gitignore file and the themes directories:
*
!.gitignore
!wp-content/
!wp-content/themes/
!wp-content/themes/*/
!wp-content/themes/*/*
!wp-content/themes/*/*/*
!wp-content/themes/*/*/*/*
@calebbrewer
calebbrewer / MySQL Dump & Write With Git
Last active January 7, 2019 23:45
This is for putting a MySQL DB under Git.
#Pre-commit hook
#!/bin/sh
mysqldump -uuser -ppassword --skip-extended-insert databaseName > /path/to/your/repo/database.sql
cd /path/to/your/repo
git add [database].sql
#Post-merge hook
#!/bin/sh
mysql -u [mysql user] -p[mysql password] [database] < /path/to/your/repo/[database].sql