Skip to content

Instantly share code, notes, and snippets.

Lauro Moraes subversivo58

Block or report user

Report or block subversivo58

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fxsjy / gist:3291755
Last active Jun 15, 2017
Memcached in JavaScript based on Node.JS
View gist:3291755
//author: Sun, Junyi (
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js
var config ={
port: 11211,
max_memory: 300 // default 100M bytes
var net = require('net');
var LRU = function (max) { // this LRU implementaion is based on
View check-if-is-incognito-mode.js
var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
if (!fs) {
result.textContent = "check failed?";
fs(window.TEMPORARY, 100, function(fs) {
console.log('not in incognito mode');
}, function(err) {
console.log('is in incognito mode');
View gist:5774636
* Get requestAutocomplete data. Can only be called as part of an interaction event
* listener such as mouse up/down, click, key & touch.
* @param {{billing: boolean, shipping: boolean}} opts
* If billing is true, credit card & billing address details will be requested.
* If shipping is true, a shipping name & address will be requested.
* @param {function(response:Object<string, string>)} callback [description]
* You callback is passed a single response object in this format:
* {
View byepopups.user.js
// ==UserScript==
// @name Byepopups!
// @namespace
// @version 0.001
// @description try to remove all those nasty popups that happen when you click anything in the website! They do suck..
// @author MMTF
// @match *://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
joaocunha / How To Hide The Select Arrow On
Last active Feb 25, 2019
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".
View How To Hide The Select Arrow On

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
pradipchitrakar / decrypt.js
Last active Mar 8, 2019
AES Encrypt data in php and decrypt in node js.
View decrypt.js
//require cyrpto module
var crypto=require('crypto');
//key and iv should be same as the one in encrypt.php
var decipher=crypto.createDecipheriv('aes-256-cbc','12345678901234561234567890123456','1234567890123456');
//since we have already added padding while encrypting, we will set autopadding of node js to false.
// copy the output of encrypt.php and paste it below
kenmazaika /
Last active Apr 19, 2019
Showdown Markdown extension

Markdown Extensions for Wells and PrismJS


adriancooney / nw-js-cookies.js
Created Jul 23, 2015
Quick snippet to display cookie in NW.js (node-webkit) in a sweet console table.
View nw-js-cookies.js
require("nw.gui").Window.get().cookies.getAll({}, console.table.bind(console));
You can’t perform that action at this time.