Skip to content

Instantly share code, notes, and snippets.

@ScottJWalter
ScottJWalter / .asoundrc
Last active May 7, 2024 08:47
Jabra 410/510 on Picroft (Mycroft on Raspberry Pi)
pcm.jabra {
type hw
card 1
device 0
rate 48000
}
pcm.!sysdefault {
type asym
playback.pcm {
type plug
@2minchul
2minchul / example.py
Created January 18, 2019 03:50
A simple example of tenacity with aiohttp
import asyncio
import random
import logging
import aiohttp
import tenacity
logging.basicConfig(level=logging.DEBUG)
@ntamvl
ntamvl / Increasing-the-amount-of-inotify-watchers.md
Created August 16, 2017 03:10
Increasing the amount of inotify watchers

Increasing the amount of inotify watchers

If you are not interested in the technical details and only want to get Listen to work:

  • If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@bmaupin
bmaupin / free-database-hosting.md
Last active May 7, 2024 08:45
Free database hosting
@develar
develar / commit-message-format.md
Created September 1, 2017 05:34
Commit Message Format

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
@avargaskun
avargaskun / SVG.swift
Last active May 7, 2024 08:42 — forked from ollieatkinson/SVG.swift
Utilise the private CoreSVG framework in Swift
import Darwin
import Foundation
import UIKit
@objc
class CGSVGDocument: NSObject { }
var CGSVGDocumentRetain: (@convention(c) (CGSVGDocument?) -> Unmanaged<CGSVGDocument>?) = load("CGSVGDocumentRetain")
var CGSVGDocumentRelease: (@convention(c) (CGSVGDocument?) -> Void) = load("CGSVGDocumentRelease")
var CGSVGDocumentCreateFromData: (@convention(c) (CFData?, CFDictionary?) -> Unmanaged<CGSVGDocument>?) = load("CGSVGDocumentCreateFromData")
#define RELAY_PIN (8)
void setup() {
// put your setup code here, to run once:
SERIAL_PORT_USBVIRTUAL.begin(115200); // open serial connection via USB-Serial
pinMode(RELAY_PIN, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
@Cdaprod
Cdaprod / raspberrypi_hostapd_network_setup.md
Created January 25, 2024 22:46
To make your Raspberry Pi Zero 2 W broadcast a `hostapd` network upon powering on, you'll need to install and configure `hostapd` and `dnsmasq`, and set up a static IP for the wireless interface. Here's a detailed guide on how to achieve this:

To make your Raspberry Pi Zero 2 W broadcast a hostapd network upon powering on, you'll need to install and configure hostapd and dnsmasq, and set up a static IP for the wireless interface. Here's a detailed guide on how to achieve this:

Task Creation Chain

  1. Install Necessary Packages: Install hostapd and dnsmasq.
  2. Configure Static IP for WLAN: Set a static IP for the wireless interface.
  3. Configure Hostapd: Set up the access point details.
  4. Configure Dnsmasq: Set up the DHCP server.
  5. Enable Services on Boot: Ensure hostapd and dnsmasq start on boot.