Skip to content

Instantly share code, notes, and snippets.


0xADADA 0xadada

Block or report user

Report or block 0xadada

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
cryzed /
Last active Apr 1, 2020
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!


Results after following the guide as of 11.01.2017 13:08:

# sudo /sbin/rcvboxdrv -h
# Unloading modules:
# Loading modules: modprobe: FATAL: Module vboxnetadp not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxnetflt not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxpci not found in directory /lib/modules/4.4.3-1-ARCH
# modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.4.3-1-ARCH
# Solution
# from
amatiasq / curry.js
Last active Mar 15, 2019
Simple way to recursively curry javascript functions
View curry.js
* @param {Function} fn Function to curry.
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length
* @returns {Function} The currified function.
function curry(fn, length) {
length = length || fn.length;
return function currified() {
var args = [];
jtpaasch /
Created May 30, 2014
Recreate a git branch clean
# We want to clear out the "rc" branch. To do that, we need
# to be on a different branch. We'll get onto "master".
# Does master exist? The first command's status code
# will be "0" if the branch exists.
git show-ref --verify --quiet refs/heads/master
domenic /
Last active Nov 25, 2019
`module.exports =` and ES6 Module Interop in Node.js

module.exports = and ES6 Module Interop in Node.js

The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:

  • How can authors of function-modules convert to ES6 export syntax, without breaking consumers that do require("function-module")()?
  • How can consumers of function-modules use ES6 import syntax, while not demanding that the module author rewrites his code to ES6 export?

@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.

This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.

View salsa20.js
IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong,
because it must be keyed with at least 128 bits of entropy, and where
do you get this entropy, huh?
- In a browser, you get it from window.crypto.getRandomValues().
- In Node, you get it from crypto.randomBytes()
Now LOOK AT YOU! You already have secure ways to generate random bytes,
rolandinsh / gist:3510701
Created Aug 29, 2012
Do Not Track (DNT) detect with PHP code
View gist:3510701
function get_smc_dnt() {
* Do Not Track for privacy.
* When this feature is enabled, webpage should exclude all tracking tools,
* like Google Analytic and advertising networks
// returns TRUE if DNT is on and is equal to 1,
// returns FALSE if DNT is unset OR not equal to 1
return (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == 1);
kevinSuttle /
Last active Apr 2, 2020 — forked from lancejpollard/
List of Usable HTML Meta and Link Tags
View twitter-oauth-for-express.js
var oauth = require('oauth')
, request = require('request')
module.exports = function(app, params, cb) {
if(!params.consumer_key) { throw new Error('Please provide a consumer key.'); }
if(!params.consumer_secret) { throw new Error('Please provide a consumer secret.'); }
if(!params.callback_url) { throw new Error('Please provide callback url.'); }
if(!cb) { throw new Error('Please provide a callback'); }
johan / laughing-man.svg
Created Jul 6, 2011
The Laughing Man (Ghost in the Shell), 1000 byte SVG :-)
View laughing-man.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.