See .
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
module.exports = function(grunt) { | |
'use strict'; | |
require('matchdep') | |
.filterDev('grunt-*') | |
.forEach(grunt.loadNpmTasks); | |
grunt.initConfig({ | |
// ... |
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 notifier = require('node-notifier'); | |
var gulp = require('gulp'); | |
var g = require('gulp-load-plugins')(); | |
var lr = require('tiny-lr'); | |
var server = lr(); | |
var minimist = require('minimist'); | |
var env = minimist(process.argv.slice(2)); | |
var debug = !!env.debug || !!env.d; |
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
import React, { Component, PropTypes } from 'react'; | |
export default class CreditCardField extends Component { | |
static propTypes = { | |
value: PropTypes.string, | |
onChange: PropTypes.func, | |
} | |
static defaultProps = { | |
value: '' | |
} |
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
<img src="http://www.google.com/s2/favicons?domain=yourdomain.tld" width="16" height="16" alt="Favicon"> |
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
class MyTag(TagBase): | |
def slugify(self, tag, i=None): | |
slug = slughifi(tag) | |
if i is not None: | |
slug += "_%d" % i | |
return slug | |
class Meta: | |
verbose_name = _("Tag") |
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
# /bin/bash | |
# run from Express project root directory | |
# Dependencies: wget, node.js, npm, express | |
# change these to the versions you want | |
JQ="1.6.1" | |
echo '\nGenerating Express app.\n' | |
express -t ejs -c stylus |
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 formatNumber(value) { | |
value = value.toString() | |
.replace(".", ",") | |
.replace(" ", "") | |
.replace("-", "−"); | |
var re = /(\d+)(\d{3})/; | |
while (re.test(value)) { | |
value = value.replace(re, "<i>$1</i>$2"); | |
} |
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
jQuery.fn.renew = function() { | |
return $(this.selector); | |
}; | |
$('div').renew(); |
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
/* Inside grunt.js file (don't forget to add "growl" as a project dependency) */ | |
grunt.utils.hooker.hook(grunt.fail, "warn", function(opt) { | |
require('growl')(opt.name, { | |
title: opt.message, | |
image: 'Console' | |
}); | |
}); | |
OlderNewer