Skip to content

Instantly share code, notes, and snippets.

Edward Bramanti jadengore

Block or report user

Report or block jadengore

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
ziluvatar / token-generator.js
Last active Jul 19, 2019
Example of refreshing tokens with jwt
View token-generator.js
* Example to refresh tokens using
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
* I create this gist just to help those who want to auto-refresh JWTs.
const jwt = require('jsonwebtoken');
juliancoleman / YakYak.desktop
Last active Feb 12, 2018
A concise install instruction for YakYak on Ubuntu GNOME 16.04
View YakYak.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Comment=Desktop client for Google Hangouts
GenericName=Hangouts Client

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

Rich-Harris /
Last active Jul 22, 2019
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

hilkeheremans / .drone.yml
Created Apr 28, 2016
Drone CI with nodejs, npm and private modules
View .drone.yml
# drone.yml for node js CI with npm login
# Don't forget to configure DRONE_SERVER and DRONE_SERVER
# Now create a secrets.yml (OUTSIDE of your repo!!) (see other file)
# then run drone secure --repo <drone_repo_name> --in <path>/secrets.yml
image: risingstack/alpine:3.3-v4.2.6-1.1.3
- npm config set //$NPM_TOKEN
- npm install
rauchg /
Last active Jun 7, 2019
chrisfrancis27 / example.js
Created Jan 25, 2016
Bookshelf hash IDs
View example.js
'use strict';
const _ = require('lodash');
const bookshelf = require('../config/bookshelf');
const hasher = require('../utils/hasher');
let Example = Bookshelf.model.extend({
tableName: 'examples',
samdvr / Uncle Bob Scribe's Oath
Last active Aug 25, 2018
Uncle Bob Scribe's Oath
View Uncle Bob Scribe's Oath
Uncle Bob's Scribe's Oath
1. I will not produce harmful code
2. I will not produce code that's not my best
3. I will provide with each release a quick testable repeatable proof that code works
4. I will not avoid release that will impede progress(short term rapid releases)
5. I will fearlessly and relentlessly improve the quality of code. I will
never make the code worse
6. I will keep productivity high I will not do anything that decreases
7. I will continuously ensure others can cover for me and I can cover for them
allaniftrue / easylist_adservers.php
Created Oct 18, 2015
Extract Easylist Adservers from the huge file for DNS
View easylist_adservers.php
# Get contents from easylist domain
$content = file_get_contents('easylist.txt');
# Extract adserver list only
preg_match('/(\!\s\*\*\*\seasylist:easylist\/easylist_adservers\.txt\s\*\*\*)[^"]+(\!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-Third\-party\sadverts\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\!)/', $content, $extracted, PREG_OFFSET_CAPTURE);
* Remove unnecessary strings from every URL
glortho / prop_nullable.js
Last active Apr 24, 2018
Nullable PropType for React
View prop_nullable.js
* Usage:
* import React from 'react';
* import nullable from 'prop_nullable';
* let myClass = React.createClass({
* propTypes: {
* myProp: nullable( React.PropTypes.string ).isRequired,
* myOtherProp: nullable( [React.PropTypes.string, React.PropTypes.number] )
You can’t perform that action at this time.