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
| /* | |
| TempHumidityPrinter | |
| (c) Colin Faulkingham 2011 - MIT license | |
| Sparkfun Thermal Printer http://www.sparkfun.com/products/10438 | |
| Adafruit DHT11 Temp and Humidy Sensor https://www.adafruit.com/products/386 | |
| Sparkfun 16x2 LCD display http://www.sparkfun.com/products/9761 | |
| Arduino UNO SMD http://www.sparkfun.com/products/10356 | |
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
| // Read temperature/humidity from sensor and display on LCD screen | |
| #include <SoftwareSerial.h> | |
| #include <Sensirion.h> | |
| #define lcdTxPin 2 | |
| #define sensorDataPin 3 | |
| #define sensorClockPin 4 | |
| float temperature; |
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($) { | |
| $.fn.blinky = function(args) { | |
| var opts = { frequency: 1e3, count: -1 }; | |
| args = $.extend(true, opts, args); | |
| var i = 0; | |
| var that = this; | |
| var dfd = $.Deferred(); | |
| function go() { | |
| if(that.length == 0) { | |
| return dfd.reject(); |
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
| if(!function_exists('url_exists')) { | |
| function url_exists($url) { | |
| $hdrs = @get_headers($url); | |
| return is_array($hdrs) ? preg_match('/^HTTP\\/\\d+\\.\\d+\\s+2\\d\\d\\s+.*$/',$hdrs[0]) : false; | |
| } | |
| } |
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
| // makeURI 1.2.2 - create a URI from an object specification; compatible with | |
| // parseURI (http://blog.stevenlevithan.com/archives/parseuri) | |
| // (c) Niall Smart <niallsmart.com> | |
| // MIT License | |
| function makeUri(u) { | |
| var uri = ""; | |
| if (u.protocol) { | |
| uri += u.protocol + "://"; |
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
| window.onscroll = function() { | |
| if (document.documentElement.scrollTop > 500 || self.pageYOffset > 500) { | |
| $('#sidebar').css({'position':'fixed', 'top':'10px', 'left':'946px'}); | |
| } else { | |
| $('#sidebar').css({'position':'absolute', 'top':'500px', 'left':'650px'}); | |
| } | |
| } |
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
| // https://gist.github.com/854622 | |
| (function(window,undefined){ | |
| // Prepare our Variables | |
| var | |
| History = window.History, | |
| $ = window.jQuery, | |
| document = window.document; | |
| // Check to see if History.js is enabled for our Browser |
NewerOlder