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 mapRange(value, domainMin, domainMax, rangeMin, rangeMax) { | |
return ((value - domainMin) / (domainMax - domainMin)) * (rangeMax - rangeMin) + rangeMin; | |
} |
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
/* | |
* Visual tweaks for Thunderbird Conversation add-on to fit with Monterail theme | |
*/ | |
@-moz-document regexp('chrome://conversations/content/stub\\.xhtml.*') { | |
body { | |
background-color: #FFF !important; | |
} | |
#messageList { | |
margin-top: 2.8rem !important; |
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
# Modx gitignore | |
## Node.js | |
lib-cov | |
*.seed | |
*.log | |
*.csv | |
*.dat | |
*.out |
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
Ace | |
Big Brother | |
MIGX | |
phpThumbsUp | |
SEO Tab | |
SEO Pro | |
TinyMCE Rich Text Editor | |
Wayfinder | |
// Element Helper |
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
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
# Change these settings to your own preference | |
indent_style = space |
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 config = require('config'); | |
var five = require('johnny-five'); | |
var Particle = require('particle-io'); | |
var board = new five.Board({ | |
io: new Particle({ | |
token: config.get('token'), | |
deviceId: config.get('id') | |
}) | |
}); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 config = require('config'); | |
// thanks to: https://gist.github.com/lukehoban/0ee5c1bef438dc5bd7cb | |
var fs = require('fs'); | |
var util = require('util'); | |
var request = require('request'); | |
var clientId = 'test-app'; // Can be anything | |
var clientSecret = config.get('key'); // API key from Azure marketplace |
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
<!-- JSPLAYER --> | |
<div id="jquery_jplayer_1" class="jp-jplayer"> | |
</div><!-- jquery_jplayer_1 --> | |
<div id="jp_container_1" class="jp-audio"> | |
<div class="jp-type-playlist"> | |
<div class="cover"> | |
<a href="#"><img src="#.jpg" alt="#"></a> | |
<div class="jp-gui"> | |
<div class="jp-interface"> |
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
<?php | |
/** | |
* [[GrandParent]] | |
* | |
* traverse up the amount of levels you want from the current resource and get its id. | |
* @example: | |
* [[GrandParent? &levels=`2`]] | |
* | |
* inspired by http://www.sepiariver.ca/blog/modx-web/modx-quick-tip-get-id-of-grandparent | |
*/ |