Skip to content

Instantly share code, notes, and snippets.

View andrewmartin's full-sized avatar
👨‍💻
code life

Andrew Martin andrewmartin

👨‍💻
code life
View GitHub Profile
@andrewmartin
andrewmartin / Gruntfile.coffee
Created May 14, 2014 19:20
grunt-less-bootup
'use strict'
module.exports = (grunt) ->
path = require('path')
# load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks
require('time-grunt')(grunt)
# config
grunt.initConfig
@andrewmartin
andrewmartin / wordpress-sample.html
Created May 7, 2014 06:57
wordpress sample data
<strong class="style-label">Headings</strong>
<h1>Header one</h1>
<h2>Header two</h2>
<h3>Header three</h3>
<h4>Header four</h4>
<h5>Header five</h5>
<h6>Header six</h6>
<strong class="style-label">Blockquotes</strong class="style-label">
Single line blockquote:
<blockquote>Stay hungry. Stay foolish.</blockquote>
@andrewmartin
andrewmartin / node-download.js
Created April 10, 2014 08:09
Download files with node.js
var fs = require('fs'),
stub = require('./stub'),
_ = require('underscore'),
request = require('request');
// config for local file
var basePath = "images/",
data = stub.data,
urlRoot = "http://cdn.catalogs.com/";
@andrewmartin
andrewmartin / concat_viget_pattern.js
Created April 9, 2014 08:34
concat_viget_pattern.js
var concat = require('gulp-concat');
module.exports = function() {
return gulp.task("concat_app", function() {
gulp.src(["public/js/app/classes/*.js"])
.pipe(concat("classes.js"))
.pipe(gulp.dest("public/js"));
@andrewmartin
andrewmartin / gulpfile-viget-pattern.js
Created April 9, 2014 06:34
gulpfile-viget-pattern-test.js
var watch = require('gulp-watch'),
livereload = require('gulp-livereload');
gulp = require("./gulp")([
"nodemon",
"coffee",
"stylus",
"concat_app",
"concat_vendor",
"uglify_app",
@andrewmartin
andrewmartin / package.json
Created April 8, 2014 17:42
A package.json to pair with Gruntfile
{
"name": "static",
"version": "1.0.0",
"description": "Static",
"devDependencies": {
"coffee-script": "~1.3.3",
"grunt": "~0.4.1",
"matchdep": "~0.3.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-concurrent": "~0.4.1",
@andrewmartin
andrewmartin / Gruntfile.coffee
Created April 8, 2014 17:42
A nice gruntfile
"use strict"
module.exports = (grunt) ->
# load all grunt tasks
require("matchdep").filterDev("grunt-*").forEach grunt.loadNpmTasks
config =
assets: "assets"
dist: "public"
open = require('open')
fs = require('fs')
module.exports = (grunt) ->
grunt.initConfig
openFiles:
options:
filename: "index.html"
appName: "Firefox"
path: "./"
@andrewmartin
andrewmartin / SassMeister-input.scss
Created March 12, 2014 06:00
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
@andrewmartin
andrewmartin / Gruntfile-coffee.coffee
Created October 30, 2013 23:04
sample gruntfile for coffee only
"use strict"
module.exports = (grunt) ->
# load all grunt tasks
require("matchdep").filterDev("grunt-*").forEach grunt.loadNpmTasks
# config
grunt.initConfig
watch: