Skip to content

Instantly share code, notes, and snippets.

@saagarjha
saagarjha / CreateGhidraApp.sh
Last active December 27, 2024 21:27
Creates a Ghidra.app bundle for macOS
#!/bin/sh
set -eu
create_iconset() {
mkdir -p Ghidra.iconset
cat << EOF > Ghidra.iconset/Contents.json
{
"images":
[
@vudaltsov
vudaltsov / FixPostgreSQLDefaultSchemaListener.php
Last active December 27, 2024 21:26
Doctrine PostgreSQL Default Schema Fix For Symfony
<?php
declare(strict_types=1);
namespace App\Doctrine\EventListener;
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
final class FixPostgreSQLDefaultSchemaListener

Overview

The M-VAVE/CUVAVE Looper Pro (also branded by Lekato) is an affordable looper pedal for guitar. I got mine on AliExpress for $30.

It supports 9 loop slots, up to a total of 40 minutes of recording, and a maximum of 10 minutes per slot. It also has a USB port, which can be used to upload, download, or delete loop slots. Communication with the device is done over MIDI through the exchange of System Exclusive messages.

@lanceliao
lanceliao / wg-client1.conf
Last active December 27, 2024 21:20
Sample WireGuard configuration files
[Interface]
Address = 10.200.200.3/32
PrivateKey = [Client's private key]
DNS = 8.8.8.8
[Peer]
PublicKey = [Server's public key]
PresharedKey = [Pre-shared key, same for server and client]
Endpoint = [Server Addr:Server Port]
AllowedIPs = 0.0.0.0/0
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 27, 2024 21:19
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@jboner
jboner / latency.txt
Last active December 27, 2024 21:15
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@oneohthree
oneohthree / quick-slugify.sh
Last active December 27, 2024 21:15
Quick bash slugify
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
// aqui almacenas el estado
const [data, setData] = useState([])
//Para poder bindear a los cambios, lo deberas hacer en el useEffect (por lo menos yo lo hago asi)
useEffect(() => {
// la tipica query de firestore
const collectionRef = collection(db, 'your-collection-name')
// wrappeas la query para bindear a los cambios una callback (en esta tomas del nuevo snapshot lo que necesitas y lo puedes settear)
@awaik
awaik / gist:7d5b6d6ec644ae844a3740dddc990ed4
Created August 17, 2022 11:39
Flutter 3.0.5 - Sample code to detect 2 finger swipe vertically using `RawGestureDetector` and `MultiDragGestureRecognizer`.Sample code to detect 2 finger swipe vertically using `RawGestureDetector` and `MultiDragGestureRecognizer`.
// original code is here, this is upadated version for the new Flutter
// https://gist.github.com/guptahitesh121/ca7fa34d73b8b024823c85dd0c7f687d
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@MaximilianKohler
MaximilianKohler / Listmonk-tutorial.md
Last active December 27, 2024 21:12
Complete Listmonk setup guide. Step-by-step tutorial for installation and all basic functions. Amazon EC2 & SES

Listmonk setup and usage guide

When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.

I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.

There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides