Skip to content

Instantly share code, notes, and snippets.

View MartijnR's full-sized avatar

Martijn van de Rijdt MartijnR

View GitHub Profile
@MartijnR
MartijnR / hey-alex
Created September 13, 2013 18:11
Paste this in your browser console
[][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]][([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]]]+([][[]]+[])[+[[+!+[]]]]+(![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[+!+[]]]]+([][[]]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[
@MartijnR
MartijnR / hey-myf
Created September 13, 2013 18:05
Run this in browser console
[][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]][([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]]]+([][[]]+[])[+[[+!+[]]]]+(![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[+!+[]]]]+([][[]]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+!+[]]]]]+[])[+[[!+[]+!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+([][(![]+[])[+[[+[]]]]+([][[]]+[])[+[[!+[]+!+[]+!+[]+!+[]+!+[]]]]+(![]+[])[+[[!+[]+!+[]]]]+(!![]+[])[+[[+[]]]]+(!![]+[])[+[[!+[]+!+[]+!+[
@MartijnR
MartijnR / mardownToHtml.jquery.js
Last active December 17, 2015 17:19
mardownToHtml JQuery plugin
$.fn.markdownToHtml = function () {
return this.each(function () {
var html,
$childStore = $('<div/>');
$(this).children().each(function (index) {
var name = '$$$' + index;
$(this).clone().markdownToHtml().appendTo($childStore);
$(this).replaceWith(name);
});
html = $(this).html();
(function($){
$.fn.takeOut = function($nodes){
return this.filter(function(){
for (var i = 0 ; i<$nodes.length ; i++){
if ($(this).is($nodes.eq(i))){
console.log('took out node: ', $(this));
return false;
}
}
return true;
@MartijnR
MartijnR / jquery.getXPath.js
Created March 8, 2013 19:00
Get XPath from jQuery element
/**
* Creates an XPath from a node (currently not used inside this Class (instead FormHTML.prototype.generateName is used) but will be in future);
* @param {string=} rootNodeName if absent the root is #document
* @return {string} XPath
*/
$.fn.getXPath = function(rootNodeName){
//other nodes may have the same XPath but because this function is used to determine the corresponding input name of a data node, index is not included
var position,
$node = this.first(),
nodeName = $node.prop('nodeName'),
@MartijnR
MartijnR / table_widget_alt
Created December 28, 2012 23:28
table widget alternative
// var $row,
// $table = $('<table></table>'),
// $thead = $('<thead></thead>'),
// $tbody = $('<tbody></tbody>'),
// $header = $(this).find('.jr-appearance-label'),
// $content = $(this).find('.jr-appearance-list-nolabel');
//
// $row = createRow($header, 'th');
// $row.appendTo($thead);
// $thead.appendTo($table);//
@MartijnR
MartijnR / resize_stop_event
Last active December 10, 2015 07:18
resizestop event
$(window).on('resize', function(){
var resizeCount = $(window).data('resizecount') || 0;
resizeCount++;
$(window).data('resizecount', resizeCount);
window.setTimeout(function(){
if (resizeCount == $(window).data('resizecount')){
$(window).data('resizecount', 0);
//do the things
console.debug('resizing stopped');
.........;
@MartijnR
MartijnR / jq_plugin_template
Last active December 10, 2015 07:08
jQuery plugin
(function($) {
"use strict";
var MyWidget = function(element, options) {
this.init();
};
GeopointWidget.prototype = {
constructor: GeopointWidget,