This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Run JSHint validation before commit. | |
# | |
# Originally: http://stackoverflow.com/a/21238963/302550 | |
# | |
# Requires Node (http://nodejs.org/) and jshint (https://www.npmjs.org/package/jshint) | |
# be globally installed (e.g.: npm install jshint -g). | |
# | |
# Edited slightly to make it easier to work with Git GUIs (e.g. PHPStorm IDE, Tower). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/node | |
// Note that a more standard node hashbang doesn't seem to work | |
// in a BBEdit Text Filter (or perhaps it's Homebrew installed node weirdness). | |
// So, change the hashbang to a path to your node executable | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('data', function (data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/node | |
// BBEdit text filter to uglify Javascript. | |
// Uses the default compression options, *except* it turns off warnings because they cause the script to error out. | |
// | |
// Requires uglifyjs https://github.com/mishoo/UglifyJS2 | |
// In this example, I've installed uglifyjs globally via `npm install uglify-js -g` | |
// Your install directory may be different... | |
var UglifyJS = require('/usr/local/share/npm/lib/node_modules/uglify-js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
* 1stdibs cross-domain iframe helper | |
* put this near the top of the page | |
--> | |
<script type="text/javascript"> | |
(function () { | |
// SET DOCUMENT.DOMAIN FOR CROSS-FRAME COMMUNICATION | |
var domain = document.location.hostname.split('.'); | |
document.domain = domain[domain.length-2] + '.' + domain[domain.length-1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.registerMultiTask('s3deploy', 'deploy to S3 using awssum', function () { | |
// dependencies | |
var awssum = require('awssum'), | |
fs = require('fs'), | |
path = require('path'), | |
aws = require('./settings').aws; | |
var amz = awssum.load('amazon/amazon'), | |
AmazonS3 = awssum.load('amazon/s3'), | |
s3 = new AmazonS3(aws.accessKey, aws.secretKey, aws.accountId , amz.US_EAST_1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grunt minify CSS task using sqwish | |
grunt.registerMultiTask('cssmin', 'minify css with sqwish', function () { | |
var sqwish = require('sqwish'), | |
dest = this.file.dest; | |
try { | |
var css = grunt.file.read(this.file.src), | |
min = sqwish.minify(css); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Skeleton Parent Page</title> | |
<style type="text/css"> | |
html { | |
width: 100%; | |
height: 100%; | |
} |
NewerOlder