Skip to the relevant sections if needed.
This file contains hidden or 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
//GET OR SET OBJECTS BASED ON LITERAL PATHS | |
function obj(base, path, value) { | |
const getter = typeof value === 'undefined', | |
nullify = (value === null), | |
keys = path.split(/[\.\[\]]/).filter((i) => i); | |
let key, | |
rBase = base || {}; | |
while ((key = keys.shift())) { | |
if (keys.length) { | |
if (getter || nullify) { |
This file contains hidden or 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
<!-- | |
We sometimes just want a nice looking HTML with | |
the least possible code to embed these bad boys. | |
No load check, nothing, just honest get to action. | |
--> | |
<!-- GOOGLE ANALYTICS --> | |
<script data-id=google-analytics> | |
(function() { |
This file contains hidden or 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
#FROM=reactnativecommunity/react-native-android | |
FROM=reactnativeci/android-base | |
docker-run = @ touch .env && docker run\ | |
--name rn\ | |
--network host\ | |
--privileged\ | |
--volume /dev/bus/usb:/dev/bus/usb\ | |
--volume opt:/opt/android\ | |
--volume npm:/root/.npm/\ |
This file contains hidden or 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
/** | |
* Temporary wrapper for firebase functions until @sentry/serverless support is implemented | |
* It currently supports wrapping https, pubsub and firestore handlers. | |
* usage: https.onRequest(wrap((req, res) => {...})) | |
*/ | |
import type {Event} from '@sentry/types'; | |
import type {https} from 'firebase-functions'; | |
import type {onRequest, onCall} from 'firebase-functions/lib/providers/https'; | |
import type {ScheduleBuilder} from 'firebase-functions/lib/providers/pubsub'; | |
import type {DocumentBuilder} from 'firebase-functions/lib/providers/firestore'; |
This file contains hidden or 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
#!/bin/env sh | |
# usage: [sep] adds a separator between adjective and noum .ie: randname "-" | |
# source: https://grammar.yourdictionary.com/parts-of-speech/adjectives/list-of-positive-adjectives.html | |
# source: https://eslgrammar.org/list-of-nouns/ | |
ADJECTIVES="affectionate agreeable amiable bright charming creative determined diligent diplomatic dynamic energetic friendly funny generous giving gregarious hardworking helpful imaginative kind likable loyal patient polite sincere adept brave capable considerate courageous faithful fearless frank humorous knowledgeable loving marvelous nice optimistic passionate persistent plucky proficient romantic self-confident sensible thoughtful warmhearted willing zestful amazing awesome blithesome excellent fabulous favorable fortuitous gorgeous incredible unique mirthful outstanding perfect philosophical propitious remarkable rousing spectacular splendid stellar stupendous super upbeat stunning wondrous alluring ample bountiful brilliant breathtaking dazzling elegant enchant |
This file contains hidden or 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
{ | |
"hosting": { | |
"public": "./", | |
"site": "example", | |
"ignore": ["firebase.json"], | |
"redirects": [ | |
{ | |
"regex": "^/([^_].*)", | |
"destination": "https://example.com/:1", | |
"type": 301 |
This file contains hidden or 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
/** | |
* SOURCE: https://github.com/firebase/firebase-tools/tree/master/scripts/examples/hosting/update-single-file | |
* THIS IS AN EXPERIMENT OF THE ABOVE THAT COULD BE USED BY ANY CLOUD | |
* FUNCTION TO UPDATE HOSTING FILES (THINK OF A CMS). THE BENEFITS WOULD BE TO | |
* RUN THE CLOUD FUNCTION ONLY ONCE, WHILE HAVING THE HOSTING FILES UPDATED AND | |
* SERVED STATICALLY MUCH FASTER THROUGH A CDN. | |
* | |
* Usage: | |
* import {updateHostingFiles} from './lib/hosting'; | |
* await updateHostingFiles([{path: '/foo.json', data: '{version:2}']); |
OlderNewer