Skip to content

Instantly share code, notes, and snippets.

View tareq0065's full-sized avatar
🌏
World will change

Tareq Aziz tareq0065

🌏
World will change
View GitHub Profile
@tareq0065
tareq0065 / google.js
Created September 12, 2022 17:34 — forked from jamesandariese/google.js
Create a google account and go to youtube with puppeteer.
const puppeteer = require('puppeteer');
const uuid = require('uuid');
const sleep = ms => new Promise(r => setTimeout(r, ms));
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
const id = uuid.v4();
@tareq0065
tareq0065 / how-to-use-web3-with-react-native.md
Created March 12, 2022 23:53
How to set up web3.js (Ethereum JS API) with Create React Native App

How to set up web3.js with CRNA

This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.

TL;DR

If you are lazy and just want to get started, I have this project ready for you. It should work out-of-the-box.

Installation guide

  1. Make sure you have Node version 6 or later installed, if not, get it on the Node website
#!/usr/bin/env bash
echo "
----------------------
NODE & NPM
----------------------
"
# add nodejs 10 ppa (personal package archive) from nodesource
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
import {useEffect, useState} from 'react';
import {Alert} from 'react-native';
import BackgroundGeolocation from '@mauron85/react-native-background-geolocation';
import {defaultLocation} from '../utils/vars';
import {getDistanceFromLatLonInKm} from '../utils/getDistance';
const useTracking = (isActive: boolean) => {
const [location, setLocation] = useState(defaultLocation);
const [history, setHistory] = useState<any>([]);
const [distance, setDistance] = useState<number>(0);
@tareq0065
tareq0065 / nextjs-file-upload-api.js
Created April 8, 2020 22:24 — forked from agmm/nextjs-file-upload-api.js
Simple Nextjs File Upload β€” Backend API
// Backend
import formidable from 'formidable';
export const config = {
api: {
bodyParser: false,
},
};
export default async (req, res) => {
@tareq0065
tareq0065 / answer1.php
Last active April 28, 2019 20:31
Pre-Test
<?php
function isSubset($arr1, $arr2) {
$i = 0;
$j = 0;
$m = count($arr1);
$n = count($arr2);
for ($i = 0; $i < $n; $i++) {
for ($j = 0; $j < $m; $j++) {