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
| <?php | |
| /** | |
| * UUID class | |
| * | |
| * The following class generates VALID RFC 4122 COMPLIANT | |
| * Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
| * | |
| * UUIDs generated validates using OSSP UUID Tool, and output | |
| * for named-based UUIDs are exactly the same. This is a pure | |
| * PHP implementation. |
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
| <?php | |
| /** | |
| * LDAP PHP Change Password Webpage | |
| * @author: Matt Rude <http://mattrude.com> | |
| * @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/ | |
| * | |
| * | |
| * GNU GENERAL PUBLIC LICENSE | |
| * Version 2, June 1991 |
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 redPin = 11; | |
| const int greenPin = 10; | |
| const int bluePin = 9; | |
| void setup() { | |
| // Start off with the LED off. | |
| setColourRgb(0,0,0); | |
| } | |
| void loop() { |
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
| // Timer test | |
| // Kevin Karplus | |
| // 12 July 2011 | |
| // One of the simplest data acquisition tasks is | |
| // to time the interval between two events. | |
| // This program waits for pin 4 to go high, | |
| // starts a timer, lights the on-board LED, | |
| // then waits for pin 5 to go low, |
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
| /* | |
| * Normalized hide address bar for iOS & Android | |
| * (c) Scott Jehl, scottjehl.com | |
| * MIT License | |
| */ | |
| (function( win ){ | |
| var doc = win.document; | |
| // If there's a hash, or addEventListener is undefined, stop here | |
| if( !location.hash && win.addEventListener ){ |
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
| <?php | |
| function is_valid_luhn($number) { | |
| settype($number, 'string'); | |
| $sumTable = array( | |
| array(0,1,2,3,4,5,6,7,8,9), | |
| array(0,2,4,6,8,1,3,5,7,9)); | |
| $sum = 0; | |
| $flip = 0; | |
| for ($i = strlen($number) - 1; $i >= 0; $i--) { | |
| $sum += $sumTable[$flip++ & 0x1][$number[$i]]; |
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
| { | |
| "ad": [ | |
| "42.5000", | |
| "1.5000" | |
| ], | |
| "ae": [ | |
| "24.0000", | |
| "54.0000" | |
| ], | |
| "af": [ |
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
| /************************************************************************** | |
| * OSM2GEO - OSM to GeoJSON converter | |
| * OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
| * corresponding GeoJSON object. | |
| * | |
| * AUTHOR: P.Arunmozhi <aruntheguy@gmail.com> | |
| * DATE : 26 / Nov / 2011 | |
| * LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
| * LICENSE URL: http://sam.zoy.org/wtfpl/ | |
| * |
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
| ARDUINO_PATH='/usr/share/arduino/hardware/arduino/cores/arduino' | |
| VARIANTS_PATH='/usr/share/arduino/hardware/arduino/variants/standard' | |
| MCU='atmega328p' | |
| F_CPU=16000000 | |
| PORT='/dev/ttyACM0' | |
| UPLOAD_RATE=115200 | |
| CORE_SOURCES=\ | |
| $(ARDUINO_PATH)/wiring.c\ | |
| $(ARDUINO_PATH)/wiring_analog.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
| import logging | |
| import logging.handlers | |
| log = logging.getLogger(__name__) | |
| log.setLevel(logging.DEBUG) | |
| handler = logging.handlers.SysLogHandler(address = '/dev/log') | |
| formatter = logging.Formatter('%(module)s.%(funcName)s: %(message)s') |
OlderNewer