Skip to content

Instantly share code, notes, and snippets.

View flesler's full-sized avatar

Ariel Flesler flesler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am flesler on github.
  • I am flesler ( on keybase.
  • I have a public key ASDTQ7nAI0h6A30viv-fxCdWf_B0Y_wlkKYWVJ0eSCLXuwo

To claim this, I am signing this object:

<p>Arrastrar el link a la barra de favoritos y clickearlo viendo la pagina de algun diario online</p>
<a href="javascript:(function(tags,ignore,suffix){function arr(nodes){return[]}
tags.forEach(function(tag,i){arr(document.getElementsByTagName(tag)).forEach(function(node){var prev=arr(node.parentNode.childNodes).filter(function(other){return tags.indexOf(other.nodeName)!==-1&&tags.indexOf(other.nodeName)<i});if(prev.length){return}'visible';'auto';if(node.innerHTML.indexOf(suffix)===-1&&!ignore.test(node.innerHTML)){node=node.getElementsByTagName('a')[0]||node;node.appendChild(document.createTextNode(suffix))}})})})(['H2','H3'],/d.lar/i,' y esto hizo subir el dolar')">Diario</a>
flesler / max-clap.html
Created May 7, 2018 13:55
Bookmarlet to max clap on Medium
<a href="javascript:(function(){var a=new MouseEvent('mouseup',{bubbles:!0}),b=new MouseEvent('mousedown',{bubbles:!0}),c=document.querySelector('.js-postActionsFooter button[data-action=multivote]');var d=0;var e=setInterval(function(){var f=document.querySelector('.js-floatingMultirecommendCount'),g=parseInt(f&&f.textContent||-1,10);(50===g||100<d)&&(c.dispatchEvent(a),clearInterval(e)),d++},500);c.dispatchEvent(b)})()">Max Clap</a>
flesler / post-checkout
Created April 19, 2017 14:02 — forked from betorobson/post-checkout
git hook to run a command after `git pull` and `git checkout` if a specified file was change for example, package.json or bower.json
#!/usr/bin/env bash
# fork from
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
check_run package.json "npm prune && npm install"
flesler / proxy.js
Last active December 13, 2016 17:17
Easily proxy HTTPS requests to an HTTP server - Test certificate is self-signed
const https = require('https');
const fs = require('fs');
module.exports = function (server) {
const options = {
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.crt'),
const sourcePort = server.address().port;
flesler / export-spotify-songs-bookmarklet.html
Last active March 9, 2024 07:25
Bookmarklet to export the list of songs from Spotify
<li>Exports the list of songs from Spotify <i>Songs</i> or current playlist sections</li>
<li>It will open a popup, you need to allow them to open</li>
<li>You need to scroll all the way so Spotify loads all the song names</li>
<li>Only tested on Chrome!</li>
<li>Drag the following link to your bookmarks toolbar, click it once on Spotify "Songs" page</li>
<a href="javascript:(function(){/*1.0*/var a=document.querySelector('[id^=collection-app-spotify]').contentDocument,b=a.querySelector('.songs');!b||'none''#pf-playlist-view'));var a=b.querySelectorAll('tbody tr'),c=[];[],function(a){var b=a.querySelector('.tl-name div'),d=a.querySelector('.tl-artists a');b&&d&&(a=a.dataset.uri.replace('spotify:track:',''),c.push(d.innerHTML+' - '+b.innerHTML+' [<a href=\''+a+'\'>link</a>]'))});c.length!==a.length&&alert(a.length-c.length+' songs could not be found, please scroll all the way');a='<ol><li>'+c.join('</li><
flesler / generate-pass.html
Last active October 30, 2015 14:03
Bookmarklet to generate deterministic passwords based on a service name
<p>Minified and ready to be dragged to bookmarks toolbar<br />
Remember to customize the 4 parameters at the end</p>
<a href="javascript:(function(c,f,g,e){var a=location.hostname.split('.');do var b=a.pop();while(a.length&&3>=b.length);this._custom_?b=prompt('Write the service name',b):this._custom_=!0;var a=b,d;for(d in e)a=a.replace(new RegExp(d,'i'),e[d]);a=a.replace(/[a-z]/,function(a){return a.toUpperCase()});a=f+a;a+=g.slice(-(c-a.length));a=a.slice(0,c);alert('Service:'+b+'\nPassword:'+a)})(10,'Gp','_T8e.P2j!',{i:'!',a:'@',s:'$',l:1,z:2,e:3,g:6,t:7,b:8,o:0});">
Generate Pass
<p>Uncompressed source code</p>
(function(length, prefix, suffix, map) {
/* 1.0 */
flesler / index.html
Last active September 11, 2021 13:16
Anchor navigation powered by jquery.scrollTo
<!-- Include jQuery from somewhere, must use version 1.8 or above -->
<script type="text/javascript" src="//"></script>
<!-- Include latest jquery.scrollTo, can download from -->
<script type="text/javascript" src="//"></script>
<!-- Initialize the plugin, the contents of the script can be inlined here, of course -->
<script type="text/javascript" src="js/init.js"></script>
<script type="text/javascript">
function encode() {
var v = document.getElementById('t').value;
v = encodeURIComponent(v);
document.getElementById('r').innerHTML = v;
<input type="text" id="t" placeholder="Put your data here..." />
<button onclick="encode()">Encode</button>
<p id="r"></p>
flesler / 3D
Last active December 19, 2015 00:49
javascript:[]'*'),function(n){'-0.1em 0 red, 0.1em 0 cyan'});