Skip to content

Instantly share code, notes, and snippets.

@TinHead
TinHead / shell.nix
Last active November 17, 2022 01:26
my nix-shell attempt
{ pkgs ? import <nixpkgs> { } }:
let
fhs = pkgs.buildFHSUserEnvBubblewrap {
name = "SkiffOS-fhs";
targetPkgs = pkgs: (with pkgs;
[
bc
binutils
bzip2
@Med-H
Med-H / esbuild.md
Last active November 29, 2023 10:03
esbuild with hot reload, typescript server as well as eslint server

An extremely fast JavaScript bundler written in Go.

structure path

  • public
    • favicon.ico
    • locales
  • ...
@davelevine
davelevine / how-to-cache-b2-content-with-cloudflare.md
Last active April 22, 2025 03:48
How to Properly Cache Content Hosted on Backblaze B2 with Cloudflare

How to Properly Cache Content Hosted on Backblaze B2

Summary

Because I use Cloudflare to manage my domains and Backblaze for backups, it only made sense to take advantage of their Bandwidth Alliance for creating my own CDN. This has been incredibly helpful for image hosting for this knowledge base, however, I recently noticed that caching wasn't working as it should.

The Problem

The overall problem started when I was adding a parking page for a domain I recently purchased. The background image was hosted on B2 and the image was supposed to be cached by Cloudflare. However, each time the page loaded, it would pull the image from the origin instead of the cache. I checked this on my knowledge base and found it was doing the same thing.

@sxiii
sxiii / README-Remove-Locales.md
Last active September 12, 2024 12:59
Remove Unnecessary Locales Fedora

Small guide that helps to free up space by removing unneccessary locales from Fedora
With some additional information on how to make more space on your system (advices in the end)
Tried on Fedora 34, but should work on other distros as well (RPM-Based?)

Step 0. Bonus step -- check available space before procedure:

df -lh

Step 1. Enter the locales directory

cd /usr/share/locale/

Step 2. Check that there is files to remove

ls

@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 11, 2025 15:15
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@FreddieOliveira
FreddieOliveira / docker.md
Last active May 12, 2025 11:26
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@pesterhazy
pesterhazy / indexeddb-problems.md
Last active May 13, 2025 15:31
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

@kiriwalawren
kiriwalawren / README.md
Last active August 22, 2024 19:50
WSL Configuration

Installing WSL (windows subsystem for linux)

Running the azure-team terraform make file to create your infrastructure may not work on a Windows machine. If you cannot get it to run, install a linux distribution where you will exectute the tf files. Setting up a distribution with all of the right dependencies does involve a bit of setup to get it configured properly. The following is a list of steps you'll need to complete:

Install WSL

@alanshaw
alanshaw / streaming-iterables.md
Last active September 22, 2023 23:49
Streaming iterables WAT?

Streaming iterables

Your friends from pull stream, but in terms of async iterators.

source it

A "source" is something that can be consumed. It is an iterable object.

const ints = {
// It doesn't work well, I just want to save this imperfect note for myself in case I need it in the future.
// It's a modified version of code on https://stackoverflow.com/a/43900205/521957
// If want to know how http2 session is initiated also look at https://github.com/golang/net/blob/master/http2/transport.go#L532
package main
import (
"crypto/tls"
"io"
"log"
"os"