Skip to content

Instantly share code, notes, and snippets.

@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.
@wojteklu
wojteklu / clean_code.md
Last active May 7, 2024 08:41
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@alessio
alessio / Homebrew in a multi-user environment.md
Created January 13, 2024 22:13 — forked from claui/Homebrew in a multi-user environment.md
Using Homebrew on macOS in a multi-user environment

I’ve had success using Homebrew in a multi-user environment the following way:

Create a shared Homebrew user

Create a new (non-GUI) user, group and home directory:

sudo /usr/sbin/sysadminctl -addUser brew \
  -fullName 'Homebrew' -admin -home /var/brew \
  -password - -UID 430 \