Skip to content

Instantly share code, notes, and snippets.

@robin-drexler
robin-drexler / plusone-links.js
Created January 8, 2012 22:20
show plus one count of links
@robin-drexler
robin-drexler / Rich Snippet Bookmarklet
Created January 10, 2012 20:31
Redirect to Google Rich Snippet Testing Tool with currrent URL as parameter. http://blog.robin-drexler.com/2012/01/rich-snippet-testing-bookmarklet.html
javascript:window.location.href="http://www.google.com/webmasters/tools/richsnippets?url="+encodeURIComponent(window.location.href);
@robin-drexler
robin-drexler / jquery adblock detection
Created January 22, 2012 15:37
jquery adblock detection
$(window).load(function () {
if($("#div-containing-ads").height() == "0") {
doSomethingUgly();
}
});
@robin-drexler
robin-drexler / getCachedJSON.js
Created October 13, 2012 17:17 — forked from k0pernikus/getCachedJSON.js
jQuery.getJSON abstraction to cache data to localStorage with invalidation option based time
jQuery.extend({
getCachedJSON: function (url, callback) {
var cacheTimeInMs = 3600000;
var currentTimeInMs = new Date().getTime();
var cache = {
data:null,
timestamp:null
};
@robin-drexler
robin-drexler / indexesof
Created October 28, 2012 22:23
Returns the indexes within the string of the occurrences of the specified value
function indexesOf(source, searchTerm) {
var occurrences = [],
index = 0;
while (index = ~source.indexOf(searchTerm, index)) {
index = ~index;
occurrences.push(index);
index++;
}
@robin-drexler
robin-drexler / Zeit Rechtschreibfehler :)
Last active October 13, 2015 04:07
Zeit Rechtschreibfehler :)
Lizensierung: 18
Rythmus: 5
Rückgrad: 6
Rückrat: 1
Wehmutstropfen: 2
gesponsort: 17
pieksen: 15
skurill: 1
Abberation: 0
Addresse: 1
It uses Google Analytics, a web analysis service of Google Inc., (“Google”). Google Analytics stores cookies on your computer which allow you to analyze the surfing patterns of visitors to your website. The information generated by the cookie about your use of this website (including your IP address) will be sent to a Google server in the United States and stored there. Google will use this information to evaluate your use of the website, to compile reports on website activity for website operators and to p other website activity and internet-related services. If required by law, Google will pass along this information to third parties. Google will also pass along data to third parties for processing, provided this processing is done on behalf of Google. Under no circumstances shall Google connect your IP address with any other data held by Google. If you wish, you can adjust your browser settings so as to refuse cookies. Please keep in mind, however, that if you refuse all cookies, you will not necessarily h
function archiveReadMails() {
var threads = GmailApp.search('label:inbox is:read -is:starred');
GmailApp.moveThreadsToArchive(threads);
};
@robin-drexler
robin-drexler / file one
Created November 9, 2013 21:50
require gist example
alert('yo dawg');