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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: Mailvelope v1.5.1 | |
Comment: https://www.mailvelope.com | |
xsFNBFe98WgBEAClcLt6EUSxeD/tOptUMo0WTSaXPsKcMh+lbDoURi3MzIEw | |
hGbOMurD11FG8Hcr039MgvUpP8P+WFTb+vrz4lMz/sRJ/bHlB3+NptU7fZIt | |
vjL+LS7v6eMw0o6aSOZ2S19+PE7ri7Q8PQjXZk4aZk7YucW+x/ANtwFNDvfI | |
sCJrho0bHQXs5vbv/P1768WTXHO/kL528SKNFylt4eHaUBgmftZjutpPu0bP | |
ulxplmmQryjOkohHWHJKn1sUnOAVteK3vzYkXyQy9tkyQP4wG6ga+5nI33W8 | |
P6YlVkBODj8CKOGyrh9yEmyyENltqnOsBeZr6vbju/u112/iJdqwhfe27MLy |
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/bash | |
title=$1 | |
shift | |
if [ "$title" == "" ]; then | |
title="Finished" | |
fi | |
body=$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
watch: { | |
scripts: { | |
files: "src/**/*.js", | |
tasks: "concat" | |
} | |
} |
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
module.exports = function(grunt) { | |
function custom () { | |
console.log(this.data.variable); | |
}; | |
grunt.initConfig({ | |
custom: { | |
dist: { | |
variable: 'value' | |
} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
concat: { | |
dist: { | |
src: ['src/util.js', | |
'src/project.js', | |
'src/execute.js'], | |
dest: 'dist/project.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
chunkString = chunkString.replace(/src="(.*\.js)"/, | |
'src="$1?cb=' + Math.random() + '"'); | |
chunkString = chunkString.replace(/href="(.*\.css)"/, | |
'href="$1?cb=' + Math.random() + '"'); |
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
var Transform = require('readable-stream/transform.js'); | |
function serveTransformedHTML (httpRequest, httpResponse) { | |
var remoteRequest, transform, remoteURL; | |
console.log("transforming: " + httpRequest.url); | |
transform = new Transform(); | |
transform._transform = function (chunk, | |
outputFunction, | |
callback) { |
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
function serveViaProxy (httpRequest, httpResponse) { | |
if (/\.html/.test(httpRequest.url)) { | |
serveTransformedHTML(httpRequest, httpResponse); | |
} else { | |
serveUnalteredViaProxy(httpRequest, httpResponse); | |
} | |
} |
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
var mime = require('mime'); | |
function serveLocalFile (httpRequest, httpResponse, filename) { | |
console.log("local: " + httpRequest.url); | |
var send404 = function () { | |
httpResponse.setHeader('Content-Type', 'text/html'); | |
httpResponse.write("NOT FOUND: " + httpRequest.url); | |
httpResponse.end(); | |
}; |
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
var localFiles = { | |
"/js/working.js": "local/working.js" | |
}; | |
function server (httpRequest, httpResponse) { | |
var filename = localFiles[httpRequest.url]; | |
if (filename) { | |
serveLocalFile(httpRequest, httpResponse, filename); | |
} else { | |
serveViaProxy(httpRequest, httpResponse); |
NewerOlder