Skip to content

Instantly share code, notes, and snippets.

View conto295's full-sized avatar

conto295

  • Solar System
  • 04:05 (UTC +07:00)
View GitHub Profile
@Redict
Redict / poc.py
Last active December 7, 2025 05:42
WolframAlpha Pro free and unlimited access to API
import requests
from hashlib import md5
from urllib.parse import urlsplit, urlencode, unquote_plus
headers = {"User-Agent": "Wolfram Android App"}
APPID = "3H4296-5YPAGQUJK7" # Mobile app AppId
SERVER = "api.wolframalpha.com"
SIG_SALT = "vFdeaRwBTVqdc5CL" # Mobile app salt
s = requests.Session()
@pianosnake
pianosnake / bounding-box-from-lat-lng-zoom-img-size.js
Last active January 20, 2025 20:18
Get a bounding box from latitude, longitude, zoom level and image size. Useful for getting the bounding box of a static map generated with only those variables.
const EARTH_CIR_METERS = 40075016.686;
const degreesPerMeter = 360 / EARTH_CIR_METERS;
function toRadians(degrees) {
return degrees * Math.PI / 180;
};
function latLngToBounds(lat, lng, zoom, width, height){
const metersPerPixelEW = EARTH_CIR_METERS / Math.pow(2, zoom + 8);
const metersPerPixelNS = EARTH_CIR_METERS / Math.pow(2, zoom + 8) * Math.cos(toRadians(lat));
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active October 24, 2025 14:23
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for(...;...;...) or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@hiroara
hiroara / 三重県.json
Last active November 8, 2025 02:43
Japan Prefectures Geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.