Skip to content

Instantly share code, notes, and snippets.

Dylan Jhaveri dylanjha

Block or report user

Report or block dylanjha

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
@dylanjha
dylanjha / airports.json
Created Dec 26, 2018 — forked from tdreyno/airports.json
JSON data for airports and their locations
View airports.json
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
@dylanjha
dylanjha / crypto-pbkdf2-example.js
Created Nov 15, 2017 — forked from skeggse/crypto-pbkdf2-example.js
Example of using crypto.pbkdf2 to hash and verify passwords asynchronously, while storing the hash and salt in a single combined buffer along with the original hash settings
View crypto-pbkdf2-example.js
var crypto = require('crypto');
// larger numbers mean better security, less
var config = {
// size of the generated hash
hashBytes: 32,
// larger salt means hashed passwords are more resistant to rainbow table, but
// you get diminishing returns pretty fast
saltBytes: 16,
// more iterations means an attacker has to take longer to brute force an
View font-resize.js
// an element with class 'font_resize' with css properties:
// * max-height
// * max-width
// * font-size
// the element has children span elements, the font size inside these spans will re resized.
;(function($){
$.fn.fontResize = function(options){
var spans = $('span:visible', this);
var heightMax = parseInt($(this).css('max-height'), 10),
You can’t perform that action at this time.