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://apis.is/cyclecounter | |
// particle webhook GET ice_bikes "http://apis.is/cyclecounter" | |
// Jordans-MacBook-Pro:~ jshaw$ particle webhook GET ice_bikes "http://apis.is/cyclecounter" | |
// Sending webhook request { uri: 'https://api.particle.io/v1/webhooks', | |
// method: 'POST', | |
// json: | |
// { event: 'ice_bikes', | |
// url: 'http://apis.is/cyclecounter', | |
// deviceid: undefined, |
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> | |
<title>Custom Street View panorama tiles</title> | |
<meta charset="utf-8"> | |
<style> | |
html, body, #map-canvas { | |
height: 100%; | |
margin: 0px; | |
padding: 0px |
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 list = [9,1,7,3,4,2,8,0,5,6]; | |
function chunk(list) { | |
var chunks = []; | |
for(var i=0; i<list.length; i++) { | |
if(list.length % 2 == 1 && i+1 == list.length) { | |
chunks.push(list[i]); | |
} else { | |
if(i % 2 == 0) { | |
chunks.push(Math.max(list[i], list[i+1])); |
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> | |
<title>Tournament Bracket Generator</title> | |
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script src="http://underscorejs.org/underscore-min.js"></script> | |
<script> | |
$(document).on('ready', function() { | |
var knownBrackets = [2,4,8,16,32], // brackets with "perfect" proportions (full fields, no byes) |
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
<!--Example JS template--> | |
<script type="text/template" id="PastCommunityTemplate"> | |
<img class="pvs-cmy-img" src="<%= thumbnail %>" alt="<%= name %>"> | |
<h3 class="pvs-cmy-title"><%= name %></h3> | |
<h4 class="pvs-cmy-city">City: <%= city %></h4> | |
<p class="pvs-cmy-description"><%= summary %></p> | |
</script> |
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
// When using underscore this passes the class scope into the event handler (callback function) | |
// rather than having the click event scope in the handler (callback function) | |
Navigation.prototype._addClickEvent = function () { | |
var handler = _(this._handleEventClick).bind(this); | |
this.$nav_items.on('click', handler); | |
}; | |
// Here this refers to Navigation.prototype rather than the event which gets passed in | |
Navigation.prototype._handleEventClick = function (evt) { | |
evt.preventDefault(); |
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 1 # | |
## Header 2 ## | |
### Header 3 ### (Hashes on right are optional) | |
#### Header 4 #### | |
##### Header 5 ##### | |
## Markdown plus h2 with a custom ID ## {#id-goes-here} | |
[Link back to H2](#id-goes-here) | |
This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one |
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
Grep | |
========== | |
grep -ir "some_string" some_directory | |
grep -ir --include=*.less "some_string" some_directory |