wss://ndt-mlab1-tnr01.mlab-oti.measurement-lab.org/ndt/v7/download?access_token=eyJhbGciOiJFZERTQSIsImtpZCI6ImxvY2F0ZV8yMDIwMDQwOSJ9.eyJhdWQiOlsibWxhYjEtdG5yMDEubWxhYi1vdGkubWVhc3VyZW1lbnQtbGFiLm9yZyJdLCJleHAiOjE2NzY4OTYwNDksImlzcyI6ImxvY2F0ZSIsImp0aSI6ImU5ZjFjNDA4LWY5MjItNDJhMy1hODc2LWIyYjhlMmJmZGNkNyIsInN1YiI6Im5kdCJ9.uCWoNNXvomclwRRzd8LTPsIZ4PdxoC7n1eOcL54bte0z7Jr1C5Nw7ktxw5TZlTpkoa_mNDUpNYbC11MbdtrfAA&client_name=ist&locate_version=v2
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
PROTOC_ZIP=protoc-3.14.0-osx-x86_64.zip | |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP | |
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | |
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | |
rm -f $PROTOC_ZIP |
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
const axios = require("axios"); | |
const express = require("express"); | |
const GRAPHQL_URL = "https://sports-fed-api.stage.nonprod.wmsports.io/graphql"; | |
// querySportsFedApi | |
// paramaters is an objects that contains: url, token, query | |
// returns the response from the query or undefined if unsuccessful | |
const querySportsFedApiReferenceStream = async (opts) => { | |
// parameters |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"time" | |
"google.golang.org/api/sheets/v4" | |
"google.golang.org/api/option" |
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
find ./src/pages ./src/modules -type f -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.tsx"' {} \; |
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
/* | |
*Print out all palindrome and prime numbers between 1 and 100. Use any language you want. | |
1. Palindrome definition: a word, phrase, or sequence that reads the same backwards as forwards | |
2. Prime number definition: a whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1 (e.g. 2, 3, 5, 7, 11). | |
*/ | |
void main() { | |
// create numbers list from 1 to 100 | |
List<int> numbers = List.generate(100, (int index) => index + 1); | |
// print(numbers); |
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 { useEffect, useRef } from 'react'; | |
import { AppState } from 'react-native'; | |
const getAppCurrentState = () => { | |
const appState = useRef(AppState.currentState); | |
useEffect(() => { | |
const subscription = AppState.addEventListener('change', nextAppState => { |
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 RNFS from 'react-native-fs'; | |
import Share from 'react-native-share'; | |
import Progress from 'react-native-progress'; | |
const downloadAndShareImage = async (imageUrl, imageName) => { | |
const downloadDest = `${RNFS.DocumentDirectoryPath}/${imageName}.jpg`; | |
// Download the image file | |
const options = { | |
fromUrl: imageUrl, |
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
library digits_to_words; | |
class DigitsToWords { | |
static const List<String> _units = [ | |
"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" | |
]; | |
static const List<String> _tens = [ | |
"", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" | |
]; |
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |