Skip to content

Instantly share code, notes, and snippets.

/*! ColorGenerator v0.0.1 - MIT license */
'use strict';
/**
* Module dependencies
*/
var hash = function(stringToHash) {
@benjackwhite
benjackwhite / deployment.tmpl.yaml
Last active October 17, 2018 20:44
Minimal viable app
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: ben-test-((TAG))
namespace: abakus
spec:
replicas: 1
template:
metadata:
// Ed Balls
import React from 'react';
import i18n from 'i18next';
import {initReactI18next, useTranslation} from 'react-i18next';
import {cloneDeep} from 'lodash';
// This is usally imported from a json file or similar
const langEN = {
title: 'My amazing app',
@benjackwhite
benjackwhite / posthog.ts
Last active May 24, 2022 09:41
posthog-react-native-super-properties
import { Linking } from "react-native"
import PostHog from 'posthog-react-native'
import AsyncStorage from '@react-native-async-storage/async-storage';
import { v4 as uuidv4 } from 'uuid';
const getSessionId = async () => {
// You could get something remotely from an API or just store a unique ID
let sessionId = await AsyncStorage.getItem('my-session-id')
@benjackwhite
benjackwhite / ionic-rrweb.json
Created April 17, 2023 14:03
Example of an rrweb recording of ionic with issues
[
{
"type": 4,
"data": {
"href": "http://localhost:8100/tab1",
"width": 2560,
"height": 831
},
"timestamp": 1681739584084,
"delay": -290