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
| void blink(int blinks) { | |
| for ( int i = 0; i <= blinks; i++ ) { | |
| digitalWrite(led, HIGH); | |
| delay(250); | |
| digitalWrite(led, LOW); | |
| delay(250); | |
| } | |
| } |
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
| 0x95dbA27e55eE84740dF989299c1122418bC8A630 |
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 LogDebug = require('LogDebug'); | |
| var ld = new LogDebug('YOUR_API_KEY'); | |
| ld.log('This is a simple log entry'); | |
| ld.log('This log entry has complex data', { user: 'Steve', isCustomer: false }); | |
| ld.error('Server error, send a text message!'); |
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
| const int buzzerPin = 5; | |
| // Length must equal the total number of notes and spaces | |
| const int songLength = 18; | |
| // Notes is an array of text characters corresponding to the notes | |
| // in your song. A space represents a rest (no tone) | |
| char notes[] = "cdfda ag cdfdg gf "; // a space represents a rest |
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
| <script type="text/javascript"> | |
| jQuery(function() { | |
| jQuery('#WorkPhone').on('blur', function() { | |
| if(jQuery(this).val().length > 0) { | |
| jQuery.get('test.php', { 'WorkPhone': jQuery('#WorkPhone').val() }, function(data) { | |
| if ( data == 'Phone is a probable landline' ) { | |
| jQuery('#showDiv').fadeIn(); | |
| } else { | |
| jQuery('#showDiv').fadeOut(); | |
| } |
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
| #!/bin/bash | |
| # Copyright 2010 Eric Ryan Harrison <[email protected]> | |
| # Inspired by: | |
| # http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/ | |
| if [ -n "$1" ] | |
| then | |
| if [ "$1" = "off" ] | |
| then | |
| tc qdisc del dev lo root |
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 R = 6371; // km | |
| var dLat = (lat2-lat1).toRad(); | |
| var dLon = (lon2-lon1).toRad(); | |
| var a = Math.sin(dLat/2) * Math.sin(dLat/2) + | |
| Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * | |
| Math.sin(dLon/2) * Math.sin(dLon/2); | |
| var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); | |
| var d = R * c; |
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 change_style(val) { | |
| $('#stylesheet_link').attr('href', 'css/' + val + '.css'); | |
| if ( val != 'blank' ) { | |
| var w3val = val.substr(0,1).toUpperCase() + val.substr(1); | |
| $('#css_link').attr('href', 'http://www.w3.org/StyleSheets/Core/' + w3val); | |
| $('#css_link').html('http://www.w3.org/StyleSheets/Core/' + w3val); | |
| } else { | |
| $('#css_link').attr('href', 'http://ericharrison.info/w3styles/css/' + val + '.css'); | |
| $('#css_link').html('Unstyled'); | |
| } |
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
| <!-- UserPing [beta] Tracking Code --> | |
| <a href="http://userping.com"> | |
| <img src="http://ping.userping.com/badge.png" | |
| alt="get userping" title="get userping" /> | |
| </a> | |
| <script type="text/javascript" | |
| src="http://ping.userping.com/pinger.js"> | |
| </script> | |
| <!-- End UserPing Tracking Code --> |
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 random_color() { | |
| return '#' + (~~(Math.random() * 16777215)).toString(16); | |
| } |