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
| name: Release SDK | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| lint: |
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
| install() { | |
| if test -f "package.json"; then | |
| if test -f "package-lock.json"; then | |
| npm install | |
| elif test -f "yarn.lock"; then | |
| yarn | |
| else | |
| echo "warning: no lock file" | |
| yarn | |
| fi |
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
| import { useQueryState } from 'next-usequerystate'; | |
| import { useEffect } from 'react'; | |
| const defaultData = { | |
| name: 'Robert Paulsen', | |
| age: 37, | |
| } | |
| const parse = (query) => { | |
| try { | |
| const json = JSON.parse(String(query)); | |
| return { |
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
| import { useState } from 'react'; | |
| export default function Component() { | |
| const [name, setName] = useState(''); | |
| return ( | |
| <> | |
| <input value={name} onChange={(e) => setName(e.target.value)} /> | |
| {name && ( | |
| <h1> | |
| His name is <strong>{name}</strong> |
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
| import useQueryString from './useQueryString' | |
| export const Component = () => { | |
| const [cat, setCat] = useQueryString<string>({ | |
| key: 'cat', | |
| defaultValue: 'Robert Paulson', | |
| }); | |
| return <h1>His name is <strong>{cat}</strong></h1> |
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
| import { parseUrlState } from './utils.query'; | |
| import useQueryString from './useQueryString' | |
| type CatInfo = { name: string, age: number }; | |
| const defaultCatInfo = { name: 'Robert Paulson', age: 1 }; | |
| export const Component = () => { | |
| const [cat, setCat] = useQueryString<CatInfo>({ | |
| key: 'cat', | |
| defaultValue: defaultCatInfo, |
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/bash | |
| # | |
| # Script to remove GPG key from git-crypt | |
| # | |
| # It will re-initialize git-crypt for the repository and re-add all keys except | |
| # the one requested for removal. | |
| # | |
| # Note: You still need to change all your secrets to fully protect yourself. | |
| # Removing a user will prevent them from reading future changes but they will | |
| # still have a copy of the data up to the point of their removal. |
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
| # TODO: THIS FILE MIGHT HAVE TO GO TO OWN FOLDER database/main.tf | |
| variable "security_group_ids" { | |
| description = "Ids of VPC Security groups" | |
| type = list(string) | |
| } | |
| variable "database_password" { | |
| description = "Enter a new root SQL password. This variable is ignored if the DB is already set up." | |
| type = string |
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
| import React, { useCallback, useRef, useState } from "react"; | |
| import { StyleSheet, TextInput, View } from "react-native"; | |
| export const useInputFocus = () => { | |
| const refs = useRef<{ [key: string]: TextInput }>({}); | |
| const [currentFocus, setCurrentFocus] = useState<string>(""); | |
| const focus = useCallback( | |
| (key: string) => { | |
| if (refs.current[currentFocus]) { | |
| refs.current[currentFocus].blur(); |
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
| import React, { useCallback, useRef, useState } from 'react'; | |
| import { TextInput } from 'react-native'; | |
| export const useInputFocus = () => { | |
| const refs = useRef({}); | |
| const [currentFocus, setCurrentFocus] = useState(''); | |
| const focus = useCallback( | |
| key => { | |
| if (refs.current[currentFocus]) { | |
| refs.current[currentFocus].blur(); |