This file contains 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
/* | |
convertVideo_config: { | |
ffmpeg: 'bin/ffmpeg/./ffmpeg', | |
mp4: '-vcodec libx264', | |
m4v: '-vcodec libx264', | |
'3gp': '-acodec libvo_aacenc -vcodec libx264', | |
webm: '-acodec libvorbis -vcodec libvpx', | |
ogv: '-acodec libvorbis' | |
}, |
This file contains 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-json-htmltemplate: | |
- readme needs to show me why I need this. If i were to stumble upon it I would have no idea what I would use it for. | |
- task name in the grunt config should be camelCase for JS consistency: `json_html_template` => `jsonHtmlTemplate` | |
- package.json: You need `gruntplugin` as a keyword for it to show up in the grunt plugin page | |
- use `this.files`, instead of this.data.src/this.data.dest | |
- You could use grunt.util.async.forEach to make it faster | |
- make sure to include tests when done. | |
grunt-browser-dependencies |
This file contains 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
(function (global) { | |
"use strict"; | |
function empty(obj) { | |
var key; | |
for (key in obj) if (obj.hasOwnProperty(key)) return false; | |
return true; | |
} | |
var Ember = global.Ember, |
This file contains 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
// | |
// Usage: require('./pid')("myapp"); | |
// | |
var fs = require('fs'); | |
module.exports = function(appname){ | |
process.title = appname; | |
var PID_FILE = "/usr/local/var/run/"+process.title+".pid"; |
This file contains 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
$('.hide').find('a').trigger('click'); |
This file contains 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
from django import template | |
from django.conf import settings | |
from pybars import Compiler | |
# Needed to register a custom template tag | |
register = template.Library() | |
# Handlebars compiler | |
compiler = Compiler() | |
# Decorator to register a tag that takes the context | |
@register.simple_tag(takes_context=True) |
This file contains 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
var shimConfig = (function (grunt) { | |
return function (property) { | |
var shim = {}; | |
var dir = grunt.file.readJSON('package.json').browserDependencies[property].dir; | |
grunt.file.readJSON('package.json').browserDependencies[property].files | |
.forEach(function (conf) { | |
var currentShim = shim[conf.require_by] = {}; | |
currentShim.path = dir + '/' + Object.keys(conf)[0]; | |
currentShim.exports = conf.exports; | |
if (conf.depends) { |
This file contains 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
browserify: { | |
modern: { | |
src: ['client/js/init.js'], | |
dest: 'built/static/js/<%= pkg.name %>.js', | |
options: { | |
debug: true, | |
noParse: [], | |
transform: [ | |
'hbsfy' | |
] |
This file contains 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/bin/env python | |
''' | |
This file is meant to setup your environment on AWS ec2 instance from a sample | |
config.json file. | |
''' | |
import os | |
import apt | |
import sys |
This file contains 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
# python alphabetize-json test.json | |
import json | |
import sys | |
args = sys.argv[1:] | |
for json_file in args: | |
with open(json_file, 'r') as file: | |
alphabetized = json.loads(file.read()) | |
with open(json_file, 'w') as w: |