Skip to content

Instantly share code, notes, and snippets.

View demographus's full-sized avatar

demographus demographus

View GitHub Profile
@stek29
stek29 / extract_telegram_macos.ipynb
Last active October 7, 2025 22:51
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Lightness/darkness adjustments

How to lighten/darken

let color = new Color("hsl(20, 100%, 30%)");

// HSL lightness adjustment
let lighter = color.clone();
@adactio
adactio / submitFormFromDatalist.js
Last active July 17, 2023 17:07
HTML's datalist element autocompletes. This script is my attempt to get it to autosubmit as well.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function (win, doc) {
'use strict';
// Cut the mustard
if (!doc.querySelectorAll || !doc.querySelectorAll('input[list]') || !win.HTMLDataListElement || !win.addEventListener){
return;
}
// Loop through each input element with a list attribute
@sarah37
sarah37 / index.html
Last active April 8, 2023 19:24
Population Pyramid Scotland 2019
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Population Pyramid Scotland 2019</title>
<link rel="stylesheet" href="style.css" />
<script src="https://d3js.org/d3.v5.min.js"></script>
</head>
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active October 10, 2025 05:24
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

Note

If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample

@brocard
brocard / index.html
Created June 13, 2019 14:20
Table with fixed header, footer and left column using position:sticky
<h1 class="intro">Table with fluid height and width fixed header, footer and first column using position:sticky </h1>
<p class="intro">This example uses position:sticky on the th elements in the thead, tfoot and left column to achieve the fixed effect. Browsers that don't support position:sticky will just get a normal table so no harm done. Resize browser smaller to see fixed first column.</p>
<div id="table-scroll" class="table-scroll">
<table id="main-table" class="main-table">
<thead>
<tr>
<th scope="col">Header 1</th>
<th scope="col">Header 2</th>
<th scope="col">Header 3 with longer content</th>
<th scope="col">Header 4 text</th>
@segunolalive
segunolalive / method-chaining1.js
Last active February 13, 2021 18:20
Simple Method Chaining
class ChainAble {
firstMethod() {
console.log('This is the First Method');
return this;
}
secondMethod() {
console.log('This is the Second Method');
return this;
}
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active September 18, 2025 06:58
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@yohanboniface
yohanboniface / boundary.ini
Created November 17, 2017 14:21
Extract boundaries from OpenStreetMap (as lines, to keep individual tags, like maritime=*)
# put here the name of keys for ways that are assumed to be polygons if they are closed
# see http://wiki.openstreetmap.org/wiki/Map_Features
closed_ways_are_polygons=aeroway,amenity,boundary,building,craft,geological,historic,landuse,leisure,military,natural,office,place,shop,sport,tourism
# comment to avoid laundering of keys ( ':' turned into '_' )
attribute_name_laundering=yes
# uncomment to report all nodes, including the ones without any (significant) tag
report_all_nodes=yes
@larsvers
larsvers / .block
Last active April 8, 2023 19:31
Canvas Globe with cities
license: mit