I hereby claim:
- I am magician11 on github.
- I am magician11 (https://keybase.io/magician11) on keybase.
- I have a public key ASDAs5s_X7XJx9A-ia8YhkFeP9nQ9sVrhFxmDNKLCgD5gQo
To claim this, I am signing this object:
/* eslint-disable no-console */ | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const app = express(); | |
/* | |
Shopify issues a HTTP POST request. | |
- https://help.shopify.com/api/tutorials/webhooks#receive-webhook |
import Constants from 'expo-constants'; | |
import * as Notifications from 'expo-notifications'; | |
import * as Permissions from 'expo-permissions'; | |
const registerForPushNotificationsAsync = async () => { | |
let token; | |
if (Constants.isDevice) { | |
const { status: existingStatus } = await Permissions.getAsync( | |
Permissions.NOTIFICATIONS | |
); |
const CDP = require('chrome-remote-interface'); | |
const chromeLauncher = require('chrome-launcher'); | |
const cheerio = require('cheerio'); | |
(async function() { | |
const launchChrome = () => | |
chromeLauncher.launch({ chromeFlags: ['--disable-gpu', '--headless'] }); | |
const chrome = await launchChrome(); | |
const protocol = await CDP({ port: chrome.port }); |
const degreesToRadians = degrees => (degrees * Math.PI) / 180; | |
const pointOnCircle = (radius, radians, origin) => { | |
const x = origin.x + Math.cos(radians) * radius; | |
const y = origin.y + Math.sin(radians) * radius; | |
return { x, y }; | |
}; |
import ReactGA from 'react-ga'; // https://github.com/react-ga/react-ga | |
import { React, Component } from 'react'; | |
class MyApp extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
someData: null, | |
}; |
const tweetnacl = require('tweetnacl'); // https://github.com/dchest/tweetnacl-js | |
tweetnacl.util = require('tweetnacl-util'); // https://github.com/dchest/tweetnacl-util-js | |
// utility function to display the Uint8Array | |
const asciiArmored = arr => tweetnacl.util.encodeBase64(arr); | |
// generate the key to encrypt a message | |
const secretKey = tweetnacl.randomBytes(32); | |
console.log(`secret key: ${asciiArmored(secretKey)}`); |
I hereby claim:
To claim this, I am signing this object:
const axios = require("axios"); | |
const config = require("../security/auth.js"); | |
const callFreshbooks = async ( | |
xml, | |
apiUrl = config.freshbooks.url, | |
authToken = config.freshbooks.token | |
) => { | |
try { | |
const response = await axios({ |
export default [ | |
['Afrikaans (Suid-Afrika)', 'af-ZA'], | |
['አማርኛ (ኢትዮጵያ)', 'am-ET'], | |
['Հայ (Հայաստան)', 'hy-AM'], | |
['Azərbaycan (Azərbaycan)', 'az-AZ'], | |
['Bahasa Indonesia (Indonesia)', 'id-ID'], | |
['Bahasa Melayu (Malaysia)', 'ms-MY'], | |
['বাংলা (বাংলাদেশ)', 'bn-BD'], | |
['বাংলা (ভারত)', 'bn-IN'], | |
['Català (Espanya)', 'ca-ES'], |
const removeDuplicates = csvStr => [...new Set(csvStr.split(',').map(tag => tag.trim()))].join(', '); |