Go to the Resources tab and in the Add-ons section type Heroku Redis in the search field. It will appear in the search list. Click on it and a modal will show up to install it, click in the Provision button to start the installation.
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
import {forwardRef, useImperativeHandle, ForwardRefExoticComponent, RefAttributes, Ref} from "react"; | |
export type Handle<T> = T extends ForwardRefExoticComponent<RefAttributes<infer T2>> ? T2 : never; | |
export const Parent = (props: {})=> { | |
let childHandle: Handle<typeof Child>; | |
return ( | |
<div onClick={()=>childHandle.SayHi()}> | |
<Child name="Bob" ref={c=>childHandle = c}/> | |
</div> |
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
/** | |
* Metro configuration for React Native | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
*/ | |
const { | |
getSymLinkedModules, | |
getBlacklistedModulesForAlternateRoot, | |
getExtraModulesForAlternateRoot, |
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
#!/bin/bash | |
# Compresses and optimizes png image sizes for a given file or directory. | |
# @author: Jonathan Cardasis | |
CHECK_MARK="\033[0;32m\xE2\x9C\x94\033[0m" | |
PNGQUANT_BINARY_URL="https://pngquant.org/pngquant.tar.bz2" | |
optimize() { | |
ORIGINAL_PATH="$1" | |
NEW_PATH="$ORIGINAL_PATH.new" |
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
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/ | |
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6 | |
// NOTE: Uses es5 javascript | |
// handle method: get | |
function doGet(e){ | |
return handleResponse(e); | |
} | |
// handles method: post | |
function doPost(e){ |
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
If you've got something like this: | |
file was built for arm64 which is not the architecture being linked (x86_64): | |
Than this gist is for you. | |
Let's say you have already developed the framework itself and just want to build the binary | |
and distribute it through the Cocoapods. | |
1. Make sure your framework "Deployment Target" is equal to all the dependencies from your podspec 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
import os, sys | |
import re | |
import base64 | |
import hashlib | |
import plistlib | |
from binascii import unhexlify | |
class FVPasswordManager(object): | |
PL_SALTED_HASH_ARRAY_KEY = 'SALTED-SHA512-PBKDF2' |
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
// | |
// DebugLogger.swift | |
// | |
// Created by Jonathan Cardasis. on 1/1/18. | |
// Copyright ©2018 Jonathan Cardasis. All rights reserved. | |
// | |
#if DEBUG | |
import Foundation |
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
// | |
// SnappCameraView.swift | |
// EdgeDetection | |
// | |
// Created by er on 11/4/17. | |
// Copyright (c) 2017 Erison Veshi | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
NewerOlder