Skip to content

Instantly share code, notes, and snippets.

View ajmalmsali's full-sized avatar
🎯
Focusing

Ajmal Sali ajmalmsali

🎯
Focusing
View GitHub Profile
@ajmalmsali
ajmalmsali / gist:9249594
Created February 27, 2014 13:01
fix index.js
$("#test_link").on("singletap", function(e) {
var a = '#test';
$.UINavigationHistory[0] = a;
$.UISetHashOnUrl(a);
$('.button.slide-out-button').hide(); // hides that toggle button
$('.slide-out').removeClass('open');
$('article').removeClass('show');
$('article').prev().removeClass('show');
$(a).addClass('open');
#!/bin/bash
#script for logging harvest from commandline.
if [[ -n $1 ]]
then
PROJECT=$1;
else
#default as free
PROJECT='free';
fi
@ajmalmsali
ajmalmsali / index.js
Last active June 21, 2017 14:21
requirebin sketch
var sanitizeHtml = require('sanitize-html');
var _ = require('lodash');
var he = require('he'); //alternative to lodash.unescape with more
var dirty = "Saw a technology &#x28;\"lickable wallpaper\"&#x29; that had at one time sounded preposterous, now seemed within reach. <myfavtag>xyz</myfavtag>";
var clean = sanitizeHtml(dirty)
console.log("clean html: -- "+clean);
console.log("decoded with he: -- "+he.decode(clean));
console.log("decoded with _: -- "+_.unescape(clean));

Keybase proof

I hereby claim:

  • I am ajmalmsali on github.
  • I am ajm_al (https://keybase.io/ajm_al) on keybase.
  • I have a public key ASC3K0tIXjr_UpvDz89FeAU2t5PzmYXp3QW1OsYhuZgJyQo

To claim this, I am signing this object: