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
c = 0 | |
check = (node) -> | |
if node instanceof HTMLElement || node instanceof HTMLDocument | |
c++ | |
console.log(c) | |
for onode in node.childNodes | |
check(onode) |
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
check host localhost with address 127.0.0.1 | |
start "/sbin/start myapp" | |
stop "/sbin/stop myapp" | |
if failed port 3000 protocol HTTP | |
request / | |
with timeout 5 seconds | |
then restart |
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/base16-ocean.dark (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 11, | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"theme": "Spacegray.sublime-theme", | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
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 FwAjax3(host, cb) { | |
var req = function() { | |
try{ return new XMLHttpRequest();} catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){} | |
try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){} | |
try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){} | |
return null; | |
}(), | |
boundary = function () { |
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
$('#header').append('<a href="/callback/call_form.php" class="call-btn" style="display:block;width:100px;height:100px;background:#666;"></a>'); | |
$('a.call-btn').fancybox({ | |
type: 'iframe', | |
width: 506, | |
height: 638 | |
}); |
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 | |
- EditorConfig | |
- Emmet | |
- HTML-CSS-JS Prettify | |
- JSHint | |
- Local History | |
- Sass | |
- SideBarEnhancements | |
- SublimeLinter | |
- SublimeLinter-css-lint |
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 | |
# Install curl if not found | |
if ! type "curl" > /dev/null; then | |
sudo apt-get update | |
sudo apt-get install curl -y | |
fi | |
# Install nvm | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh |
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 HttpResource from 'xhr'; | |
var items = new HttpResource('/api/items'); | |
items.query(function* (resume) { | |
yield items.create([ | |
{name: 'Item #1'}, | |
{name: 'Item #2'}, | |
{name: 'Item #3'} |
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 xhr = new XMLHttpRequest(); | |
xhr.open('GET', url); | |
xhr.onload = function() { | |
if (xhr.status === 200) { | |
var workerSrcBlob, workerBlobURL; | |
workerSrcBlob = new Blob([xhr.responseText], { type: 'text/javascript' }); | |
workerBlobURL = window.URL.createObjectURL(workerSrcBlob); | |
var worker = new Worker(workerBlobURL); |
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 standardDeviation (values) { | |
var avg = average(values); | |
var squareDiffs = values.map(function (value) { | |
var diff = value - avg, | |
sqrDiff = diff * diff; | |
return sqrDiff; |