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
# Minify script for production use. | |
task 'minify', 'Minify script.', (options) -> | |
muffin.run | |
files: './**/*' | |
options: options | |
map: '(jquery.flickgal).js': (matches) -> | |
q = muffin.readFile matches[0] | |
Q.when q, (result) -> | |
if _.isString result | |
a = result.match(/\/\*[\s\S]+?\*\//) |
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
# Include required libraries. | |
muffin = require 'muffin' | |
Q = require 'q' | |
_ = require 'underscore' | |
temp = require 'temp' | |
tempdir = temp.mkdirSync() | |
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
/** | |
* @param {Array} array . | |
* @return {Array} A sorted array. | |
*/ | |
function quicksort(array) { | |
if (array.length === 0) return array; | |
var pivot = array.splice(0, 1)[0], | |
left = [], | |
right = [], |
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 Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var obj = { | |
yeah: 'yeah', | |
ohh: 'ohh' | |
}; |
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
/* http://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css */ | |
/* http://jsfiddle.net/Sk8erPeter/KyVXK/ */ | |
/* Must define separately */ | |
::-webkit-input-placeholder { | |
color: red; | |
} | |
:-moz-placeholder { | |
color: red; | |
} |
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
<!-- | |
Data Import Configuration | |
This will load all your existing ticket and wiki data into the solr index. | |
If you use a database other then mysql you may need to change the queries | |
slightly. You will likely have to change the connection url as well. | |
To start this data import hit the following url (assumes solr is running | |
on the default port on localhost): | |
http://localhost:8983/solr/dataimport?command=full-import |
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/sh | |
# Service script to start|status|stop|restart Solr Server. | |
SOLR_HOME=/var/solr/ | |
SOLR_LIB=/usr/local/lib/solr/ | |
JETTY_HOME=${SOLR_LIB}example/ | |
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 = { | |
attributes: { | |
/* e.g. | |
nickname: 'string' | |
*/ | |
}, |
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
diff --git a/downgrade_orig b/downgrade_orig | |
index 119221f..4577388 100644 | |
--- a/downgrade_orig | |
+++ b/downgrade_orig | |
@@ -15,9 +15,11 @@ prompt_to_install() { | |
output_package "$((i++))" "$entry" | |
done | |
- printf "\n" | |
- gettext 'select a package by number: '; read -r ans |
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 fs = require('fs'); | |
var readable = fs.createReadStream('large.txt', {encoding: 'utf8'}); | |
var writable = fs.createWriteStream('out.txt', {encoding: 'utf8'}); | |
var count; | |
var left = ''; | |
var reader = new Reader; | |
readable.on('data', function(chunk) { |
OlderNewer