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
# originally from https://groups.google.com/a/webmproject.org/group/webp-discuss/browse_thread/thread/196ac4ea705688d8 | |
<IfModule mod_rewrite.c> | |
# TODO: don't forget to put | |
# AddType image/webp .webp | |
# in your mods-available/mime.conf | |
# (though this is optional because we're setting | |
# the mime type manually in the RewriteRule) | |
# Enable rewrite |
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
<?php | |
define ("SERIAL_DEVICE_NOTSET", 0); | |
define ("SERIAL_DEVICE_SET", 1); | |
define ("SERIAL_DEVICE_OPENED", 2); | |
/** | |
* Serial port control class | |
* | |
* THIS PROGRAM COMES WITH ABSOLUTELY NO WARANTIES ! | |
* USE IT AT YOUR OWN RISKS ! |
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 emptySet(x) { | |
return false; | |
} | |
function insert(elem, set) { | |
return function(x) { | |
if (x === elem) { // insert smarter comparison here if needed | |
return true; | |
} | |
return function() { return contains(x, set); }; |