This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load variables from `.env` as soon as possible | |
require('dotenv').config({ | |
path: `.env.${process.env.NODE_ENV || 'development'}` | |
}) | |
const clientConfig = require('./client-config') | |
const isProd = process.env.NODE_ENV === 'production' | |
// Portable Text Serialization | |
const PortableText = require("@sanity/block-content-to-html") |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"code": "AAA", | |
"lat": "-17.3595", | |
"lon": "-145.494", | |
"name": "Anaa Airport", | |
"city": "Anaa", | |
"state": "Tuamotu-Gambier", | |
"country": "French Polynesia", | |
"woeid": "12512819", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |