Skip to content

Instantly share code, notes, and snippets.

View Lebski's full-sized avatar
🐙
Building

Felix Leber Lebski

🐙
Building
View GitHub Profile
@Lebski
Lebski / mongodb-go-geospital.txt
Last active July 28, 2022 03:37
MongoDb gesospital query with golang (with mongo-go-driver)
=== RUN TestGetPointsByDistance
Inserted new Point. f0cfed41-fba5-4a2d-8179-9737b631d3c1
<nil>
[{2d91d952-2825-4a28-ae53-5a58656c4f68 {Point [12.002 12]}} {f0cfed41-fba5-4a2d-8179-9737b631d3c1 {Point [12.002 12]}}]
--- PASS: TestGetPointsByDistance (0.00s)
@Lebski
Lebski / fetch_owner_addresses.js
Created July 13, 2022 16:39
Get Token owner with Moralis API
import fetch from 'node-fetch';
import * as fs from 'fs';
function getUriWithCursor(baseUrl, cursor) {
return baseUrl + "&cursor=" + cursor
}
async function makeMoralisRequest(url) {
try {
const config = {
@Lebski
Lebski / localhost.py
Last active September 10, 2022 20:07
Flask basic file server - lets you serve your folder and nothing more
from flask import Flask, send_from_directory
app = Flask(__name__, static_url_path='', static_folder='files')
@app.route("/")
def index():
return send_from_directory("files", 'index.html')
if __name__ == "__main__":
app.run(debug=True)