Skip to content

Instantly share code, notes, and snippets.

@calebbrewer
calebbrewer / gruntfile.js
Created May 28, 2013
Grunt file for: Preprocessing sass/compass Watching for changes in the sass/compass file minifying js and sass files concatenating js files
View gruntfile.js
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
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.
View Gitignore for wordpress theme dev.
#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 Jan 7, 2019
This is for putting a MySQL DB under Git.
View MySQL Dump & Write With 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