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
<html> | |
<body> | |
<svg id="svg" width="600" height="200"> | |
<rect width="100" height="100" style="fill:rgb(255,0,0);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> | |
<rect width="100" height="100" style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
.marker-properties { | |
border-collapse:collapse; | |
font-size:11px; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 body = '<p>' + (row.body || '').split(/[\r\n\t]+/gm).join('</p><p>') + '</p>'; |
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
# 's' below refers to symlinked sublime | |
# all refers to 'testem' remove this if you dont need it | |
function job() { | |
if [[ -z "$1" ]]; then | |
echo "You must specify a project name!" | |
return; | |
fi | |
mkdir $1 && cd $1 && yo ig-job && s . && s ./app/scripts/main.js && s ./app/scripts/config.js && \ | |
osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' -e 'tell application "Terminal" to do script "cd '$PWD' && testem" in selected tab of the front window' && \ | |
grunt server; |
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 a = topic(); | |
a.add(function(){ | |
console.log('a', arguments); | |
}); | |
a.fire('message for a'); // should be "a", ["message for a"] | |
// named topic | |
var b = topic('b'); |
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 paragraphs = ['paragraph 1', 'paragraph 1']; | |
var html = '<p>' + paragraphs.join('</p><p>') + '</p>'; |
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 | |
# nodejs - Startup script for node.js server | |
# chkconfig: 35 85 15 | |
# description: node is an event-based web server. | |
# processname: node | |
# server: /path/to/your/node/file.js | |
# pidfile: /var/run/nodejs.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
var request = require( 'request' ), | |
fs = require( 'fs' ), | |
util = require( 'util' ); | |
var todo = process.argv.splice( 2 ), | |
processor = { | |
'/rest/path/foo/bar': { | |
'response.result.cid': function( str ) { |