Just add the snipped as a bookmarklet and instantly turn the current website's URL in a QR code. Very useful when you quickly want to open the page on mobile.
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
git status --porcelain | grep '^??' | |
rc=$? | |
#grep exits with 0 when a match is found. | |
if [ $rc = 0 ] ; then | |
echo "Untracked files present. Aborting push."; | |
exit 1; | |
fi |
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 initSkrollr() | |
{ | |
var constants = { | |
container: 400, //TODO delete | |
container2: 50, //TODO delete | |
pausingCumulative0 : 0, | |
pausingCumulative1 : getStartingPercentageOfSection(1), | |
pausingCumulative2 : getStartingPercentageOfSection(2), | |
pausingCumulative3 : getStartingPercentageOfSection(3), | |
pausingCumulative4 : getStartingPercentageOfSection(4), |
I'm currently using https://github.com/blueimp/jQuery-File-Upload, but it's a mess. It does it's job, but the API is...suboptimal.
I took a look at several other solutions, but most of the examples looked like this (which made me cry a little):
$(document).ready(function() {
$('#some-input').myPlugin({
option1: 1,
/*
A list of thousands of options
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Well, diff
ing the output of identify -verbose
solved the mystery: The not-working image was saved as CMYK
...
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
//Enlarge all the bacon. | |
$('.bacon').height(10000).refresh(); |
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 waitForKeyElements (selectorTxt, actionFunction) { | |
if (!getElementByXPath(selectorTxt)) { | |
setTimeout(function () { | |
waitForKeyElements(selectorTxt, actionFunction); | |
}, 300); | |
} else { | |
actionFunction(); | |
} | |
} |
From http://docs.mongodb.org/manual/core/indexes/#sparse-indexes
Any document that is missing the field is not indexed.
--
You can combine the sparse index option with the unique indexes option so that mongod will reject documents that have duplicate values for a field, but that ignore documents that do not have the key.