Skip to content

Instantly share code, notes, and snippets.

@rexim
rexim / 0001-Make-it-possible-to-include-files-over-https.patch
Last active March 29, 2024 00:04
TCC patch that enables including files via HTTPS using CURL
From 84c42091cbae3735c52e895221f3f95a87155756 Mon Sep 17 00:00:00 2001
From: rexim <reximkut@gmail.com>
Date: Wed, 30 Jun 2021 20:43:47 +0700
Subject: [PATCH] Make it possible to include files over https
---
Makefile | 2 +-
tcc.c | 5 +++++
tccpp.c | 43 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 1 deletion(-)
@JunielKatarn
JunielKatarn / vsDiffMerge.gitconfig
Last active March 29, 2024 00:03
Git config to use vsdiffmerge.exe as a diff/merge tool
# PLEASE SEE FEEDBACK. This script is not up to date and may not use the best practices.
[diff]
tool = vsdiffmerge
[difftool]
prompt = false
[difftool "vsdiffmerge"]
cmd = '"C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsdiffmerge.exe"' "$LOCAL" "$REMOTE" //t
keepbackup = false
trustexitcode = true
@Rich-Harris
Rich-Harris / service-workers.md
Last active March 28, 2024 23:58
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@emleddin
emleddin / 1-ANKI-remote.md
Last active March 28, 2024 23:55
Instructions for using the 8BitDo Zero 2 with ANKI on Linux and MacOS

Using the 8BitDo Zero 2 Remote with ANKI

The 8BitDo Zero 2 remote is ~$20 and can be used to gamify your studying.

See controller image below

The controller comes with preset keybindings that aren’t the most helpful. So, through the use of a key remapping software, you’ll update how your device interprets the keys!

If you don’t want to download a remapper, you should be able to use an

@corrieriluca
corrieriluca / App-Store-Connect-API-Python.md
Last active March 28, 2024 23:55
Connection to the App Store Connect API using Python3
import pygame
import math
# Initialize Pygame
pygame.init()
# Set up display
screen_width, screen_height = 800, 600
screen = pygame.display.set_mode((screen_width, screen_height))
pygame.display.set_caption("Drivable Vehicle")
import pygame
import math
# Initialize Pygame
pygame.init()
# Set up display
screen_width, screen_height = 800, 600
screen = pygame.display.set_mode((screen_width, screen_height))
pygame.display.set_caption("Drivable Vehicle")
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active March 28, 2024 23:53
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

@mypy-play
mypy-play / main.py
Created March 28, 2024 23:52
Shared via mypy Playground
from typing import overload, Any
class A:
@overload
def foo(self, i : int, /, **kwargs : Any) -> None:
...
@overload
def foo(self, /, **kwargs : Any) -> None:
...
@kvaps
kvaps / rspamd-lists.md
Last active March 28, 2024 23:51
Howto create local whitelists and blacklists for Rspamd

Local whitelists and blacklists for Rspamd

  • cd /etc/rspamd
  • create rspamd.conf.local
  • create lists:
touch local_bl_from.map.inc local_bl_ip.map.inc local_bl_rcpt.map.inc \
local_wl_from.map.inc local_wl_ip.map.inc local_wl_rcpt.map.inc
  • change permissions: