Skip to content

Instantly share code, notes, and snippets.

View FavyTeam's full-sized avatar
:octocat:
Remote working and relax fishing free time! 👍💯

Sr. Crypto Bear FavyTeam

:octocat:
Remote working and relax fishing free time! 👍💯
View GitHub Profile
@Linch1
Linch1 / tokenPriceApi.js
Last active March 17, 2024 08:02
Retrive the price of any bsc token from it's address without using external service like poocoin/dextools
let pancakeSwapAbi = [
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},
];
let tokenAbi = [
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},
];
const Web3 = require('web3');
/*
Required Node.js
@taseppa
taseppa / gist:66fc7239c66ef285ecb28b400b556938
Last active May 1, 2023 21:09
Getting your Tinder access token and facebook id

Getting access token

Enable developer console in browser and navigate to:

https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&scope=user_birthday%2Cuser_photos%2Cuser_education_history%2Cemail%2Cuser_relationship_details%2Cuser_friends%2Cuser_work_history%2Cuser_likes&response_type=token%2Csigned_request&client_id=464891386855067&ret=login&fallback_redirect_uri=221e1158-f2e9-1452-1a05-8983f99f7d6e&ext=1556057433&hash=Aea6jWwMP_tDMQ9y

Look for the response of POST request in the network tab of developer console: https://www.facebook.com/v2.6/dialog/oauth/confirm?dpr=1 it contains the access token parameter. Just search for 'access_token' in the response. For the lazy people (like myself) i made a small helper that parses the token from response https://taseppa.github.io/tokenparser.github.io/

Getting facebook id

@darkwave
darkwave / basic.js
Created April 15, 2017 10:09
Webcam as texture in three.js
window.addEventListener( 'resize', onWindowResize );
var scene, camera, renderer;
var geometry, material, mesh, videoTexture, movieMaterial;
var video, video_canvas;
initWebcam();
init();
animate();
function initWebcam() {