- Download the "Start HTTP Server Here.command" file
- In Safari you can do that by ⌥ (option) clicking the "raw" link next to that script.
- Add the executable flag
so that it will run when you double-click it- type
chmod +x "$HOME/Downloads/Start HTTP Server Here.command"
- type
- Move the
commandfile into the root folder of your website - Double-click it to start your webserver.
Your browser will load it up automatically
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 loadAsyncScript(URL) { | |
| var script = document.createElement('script'), | |
| firstScript = document.getElementsByTagName('script')[0]; | |
| script.async = 1; | |
| script.src = URL; | |
| firstScript.parentNode.insertBefore(script, firstScript); | |
| } | |
| loadAsyncScript('ext.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
| exports.constructor = function(){} | |
| exports.constructor.prototype = exports | |
| exports.create = function(){ | |
| return this.constructor.apply(Object.create(this), arguments) | |
| } | |
| exports.property = 'foo' |
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
| #!/usr/bin/env bash -l | |
| die () { | |
| echo "[ERROR] $@" 1>&2 | |
| exit 1 | |
| } | |
| GIT_SRC="$HOME/Projects/Sencha/SDK" | |
| GIT_ROOT="$GIT_SRC-copy" | |
| SVN_REPO="$HOME/Projects/Sencha/sdk-svn-repo" | |
| if [[ ! -d "$SVN_REPO" ]]; then |
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 regexp = LSD.RegExp({ | |
| 'fn_tail': '\\.', | |
| 'fn_arguments': '\\g<inside_round>', | |
| 'fn_name': '\\g<unicode>', | |
| 'fn': '\\g<fn_tail>?\\g<fn_name>\\(\\g<fn_arguments>\\)', | |
| 'block_arguments': '\\g<inside_curly>', | |
| 'block_body': '\\g<inside_curly>', | |
| 'block': '\\{\\g<block_arguments>?\\g<block_body>\\}', | |
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
| <element name="comment-form" constructor="CommentForm"> | |
| <template> | |
| <form class="commentForm" onSubmit={this.handleSubmit}> | |
| <input type="text" placeholder="Your name" ref="author" /> | |
| <input | |
| type="text" | |
| placeholder="Say something..." | |
| ref="text" | |
| /> |
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 bplistParser = require('bplist-parser') | |
| var bplistCreator = require('node-bplist-creator') | |
| var fs = require('fs') | |
| var DFGraph = {} | |
| DFGraph.edgeFromQCConnection = function(qcConnection, connectionKey){ | |
| return { | |
| source:{node: qcConnection.sourceNode, port:qcConnection.sourcePort}, | |
| target:{node: qcConnection.destinationNode, port:qcConnection.destinationPort} |
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
| // delete console.log | |
| querySelectorAttempt._timerIDs = [] | |
| function querySelectorAttempt(selectors, callback, _attempts){ | |
| if (!Array.isArray(selectors)) selectors = selectors.toString().split(/\s*,\s*/) | |
| console.log('querySelectorAttempt', selectors, _attempts) | |
| if (_attempts == null) _attempts = 20; | |
| var elements | |
| selectors.forEach(function(selector){ | |
| if (elements && elements.length > 0) return; | |
| elements = document.querySelectorAll(selector); |
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
| #!/usr/bin/env node | |
| /*jshint asi:true*/ | |
| fs = require('fs') | |
| child_process = require('child_process') | |
| if (module.id == '.') watchForChangesAndThenExec(process.argv[2] || process.env.PWD, process.argv[3] || "echo") | |
| module.exports = exports = watchForChangesAndThenExec |
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 Behavior(PSD){ | |
| var _BehaviorNames = Object.keys(Behavior.behaviors) | |
| .filter(function(BehaviorName){ return !!Behavior.behaviors[BehaviorName].namingPattern }); | |
| Object.keys(PSD).forEach(function(layerName){ | |
| var layer = PSD[layerName]; | |
| _BehaviorNames.forEach(function(BehaviorName){ | |
| var match = layerName.match(Behavior.behaviors[BehaviorName].namingPattern); | |
| try { |