Skip to content

Instantly share code, notes, and snippets.

@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:
@isogram
isogram / aria2c.md
Created February 13, 2016 19:26
aria2c command sample

Multiple torrent file download and sent it to background process

aria2c -j5 --max-upload-limit=2K file_1.torrent file_2.torrent file_3.torrent file_4.torrent file_5.torrent > aria2c.log 2>&1 &

@deepak
deepak / rakefile_extract_fixtures.rb
Created February 3, 2011 08:59
generate fixtures from actual data in database
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'