(function () {
// ... all vars and functions are in this scope only
// still maintains access to all globals
}());
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 java.io.IOException; | |
| import java.net.URL; | |
| import java.util.Date; | |
| import java.util.List; | |
| import java.util.logging.Level; | |
| import org.json.*; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.chrome.*; | |
| import org.openqa.selenium.logging.*; |
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
| ['log', 'warn'].forEach(function(method) { | |
| var old = console[method]; | |
| console[method] = function() { | |
| var stack = (new Error()).stack.split(/\n/); | |
| // Chrome includes a single "Error" line, FF doesn't. | |
| if (stack[0].indexOf('Error') === 0) { | |
| stack = stack.slice(1); | |
| } | |
| var args = [].slice.apply(arguments).concat([stack[1].trim()]); | |
| return old.apply(console, args); |
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
| /* | |
| * This decorates Handlebars.js with the ability to load | |
| * templates from an external source, with light caching. | |
| * | |
| * To render a template, pass a closure that will receive the | |
| * template as a function parameter, eg, | |
| * T.render('templateName', function(t) { | |
| * $('#somediv').html( t() ); | |
| * }); | |
| * Source: https://github.com/wycats/handlebars.js/issues/82 |
http://codex.wordpress.org/Theme_Features
http://codex.wordpress.org/Template_Tags
roots-dev / functions.php - if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages)
http://codex.wordpress.org/Function_Reference/bloginfo
bloginfo( $show );
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
http://blog.iconfinder.com/detecting-duplicate-images-using-python/
SELECT pk, hash, BIT_COUNT(
CONV(hash, 16, 10) ^ CONV('4c8e3366c275650f', 16, 10)
) as hamming_distance
FROM image_hashes
HAVING hamming_distance < 4
ORDER BY hamming_distance ASC;
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
| #resultswrapper { | |
| } | |
| .stats-wrap { | |
| float: right; | |
| margin-top: 5px; | |
| } | |
| .btn { | |
| display: inline-block; |
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 | |
| # | |
| # Rick Salaverria | |
| # 2014-03-04 | |
| # | |
| # Inline CSS styles | |
| style=" style=\"border:1px solid;background:#EEE;padding:10px;margin:5px 10px\"" | |
| # Date |
NewerOlder