A Pen by David Jones on CodePen.
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 { useState } from 'react'; | |
import { StyleSheet, View, Button } from 'react-native'; | |
import { usePropaga } from '@propaga/react-native-sdk'; | |
export default function App() { | |
const [isPropagaActive, setIsPropagaActive] = useState(false); | |
const { | |
startPropaga, | |
PropagaPaymentComponent, | |
loaded, |
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
(async () => { | |
const controller = new AbortController(); | |
const signal = controller.signal; | |
const response = await fetch('http://127.0.0.1:8000/hi', { signal }); | |
const reader = response.body.getReader() | |
while (true) { |
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
const controller = new AbortController(); | |
const signal = controller.signal; | |
const response = await fetch( | |
`https://jsonplaceholder.typicode.com/posts/${value}`, | |
{ signal } | |
); | |
const abortRequest = () => controller.abort(); |
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 | |
# Install docker | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update |
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
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
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
const assert = require("assert"); | |
function sortingNumbers(list = []) { | |
assert(list); | |
let currentActiveNumber = Number.MIN_SAFE_INTEGER; | |
return list.reduce((accumulator, current) => { | |
if (currentActiveNumber < current) { | |
accumulator.push(current); | |
currentActiveNumber = current; |