Skip to content

Instantly share code, notes, and snippets.

@Maxxen
Maxxen / app.py
Last active September 23, 2025 12:38
DuckDB Vector Tile Serve w/ Flask + MapLibre
import duckdb
import flask
# Initialize Flask app
app = flask.Flask(__name__)
# Setup a global DuckDB connection with spatial extension loaded
# Connect to a persistent database file with the geometry data
config = {"allow_unsigned_extensions": "true"}
con = duckdb.connect("tiles.db", True, config)
enum APCA {
static func gamma(for channel: CGFloat) -> Double {
pow(channel, 2.4)
}
static func luminance(for color: RGBColor) -> Double {
let r = gamma(for: color.red)
let g = gamma(for: color.green)
let b = gamma(for: color.blue)
var y = 0.2126729 * r + 0.7151522 * g + 0.0721750 * b
//@version=4
'''
Quick explanation from "Market Cipher - what is just a closed source of this script with alerts. (DO NOT PAY 1.500$ JUST FOR ALERT FUNCTION!)"
Market Cipher B is an all-in-one oscillator allowing for more quality indications than ever before.
It combines five algorithms (some well-known, some custom) that have all been fine-tuned and smoothed for optimal analysis and trading results.
When all of the algorithms converge, Market Cipher B will project a “Green Dot” which will aid you in longing the dips in bull markets as well as temporarily exiting shorts in bear markets.
The Green Dot is often accompanied by extreme sellers’ momentum and will warn you of potential market bottoms, giving you strong hands even when the night is at its darkest.
Market Cipher B certainly excels on the small time frames, but is a particularly deadly tool for isolating large swings in the market.
@candidtim
candidtim / .alacritty.toml
Last active September 23, 2025 12:35
Alacritty Nord theme TOML
# TOML interpretation of the https://github.com/nordtheme/alacritty
# See also: https://github.com/nordtheme/alacritty/issues/40
# (if the above is resolved, you may not need this Gist)
[colors.primary]
background = "#2e3440"
foreground = "#d8dee9"
dim_foreground = "#a5abb6"
[colors.cursor]
{
// Workbench
"workbench.sideBar.location": "right",
"workbench.startupEditor": "none",
"workbench.editor.labelFormat": "short",
"workbench.activityBar.location": "hidden",
"workbench.editor.showTabs": "single",
"workbench.tips.enabled": false,
"workbench.statusBar.visible": true,
"workbench.iconTheme": "symbols",
@bobby-tablez
bobby-tablez / theme.ps1
Last active September 23, 2025 12:32
Enable Dark or Light mode in Windows via PowerShell
# Modify Windows 10/11 or Server theme (Light or Dark mode). Makes registry changes which
# take effect upon reboot, or explorer.exe restart. Bypasses restriction to change theme on
# unactivated Windows installations.
#
# Usage:
# To switch to dark mode, run: .\theme.ps1 -Mode dark
# To switch to light mode, run: .\theme.ps1 -Mode light
#
# Optional: Restart the explorer.exe process:
# "Stop-Process -Name explorer -Force; Start-Sleep -Seconds 2; Start-Process explorer"
@noaione
noaione / guide_to_ln_manga_offline_reading.md
Last active September 23, 2025 12:31
A guide to help you get the best quality for offline reading. (Not including Translation)
@Bilka2
Bilka2 / control.lua
Last active September 23, 2025 12:28
Create a timelapse from a factorio replay save file
-- Just add this to the end of the control.lua file in the save file and then replay the file
-- This sequence is adjusted for https://www.speedrun.com/Factorio/run/mr87xlgy
script.on_nth_tick(300, function(event)
if event.tick < 90000 then
game.take_screenshot{
surface = game.surfaces[1],
position = {-88,-9},
resolution = {1920,1080},
zoom = 0.2,
@mehdishahdoost
mehdishahdoost / jq.md
Last active September 23, 2025 12:25
Install jq command without sudo
@l1kus-freedom
l1kus-freedom / !instruction.txt
Last active September 23, 2025 12:23
Инструкция по обходу блокировок\на случай интернет-шатдауна в РФ.
Сохраните себе данную инструкцию (Download ZIP) и распространите.
В РФ постепенно усиляется цензура и блокируются различные интернет-ресурсы. Нельзя исключать тот факт, что в один момент могут войти в постоянную практику локальные шатдауны и ограничению доступа во внешний Интернет.
В этой инструкции будут рекомендации по обходу блокировок на момент 05.09.2025, а также рекомендации на случай интернет-изоляции в РФ. Желательно предварительно установить и настроить весь софт — во время шатдауна у вас не будет такой возможности.
Для начала, рекомендую установить на ПК браузер Firefox или любой другой браузер с интерфейсом настройки прокси.
========================================================================================================================================
ОБХОД БЛОКИРОВОК
* Обход блокировок по DPI (Windows)
github.com/ValdikSS/GoodbyeDPI - не обновляется, плохо обходит блокировки без настройки, однако, может работать в некоторых случаях;
github.com/bol-van/zapret-win-bundle - оригинальный гит