Skip to content

Instantly share code, notes, and snippets.

@srhise
srhise / GruntFile-moduleexports.js
Created January 30, 2014 01:03
Grunt module.exports
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', [ 'concat:css', 'cssmin:css', 'concat:js', 'uglify:js' ]);
@srhise
srhise / Gruntfile.js
Created January 30, 2014 01:00
Simple Grunt Setup (2 Files)
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
css: {
src: [
'css/*'
],
dest: 'combined.css'
},
@srhise
srhise / get_post
Created January 29, 2014 20:06
get_post()
<?php
$post_7 = get_post(7, ARRAY_A);
$title = $post_7['post_title'];
?>