Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 14:39
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@tadast
tadast / countries_codes_and_coordinates.csv
Last active May 9, 2024 14:39
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Åland Islands AX ALA 248 60.116667 19.9
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.9.1
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
// @downloadURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
extension Task where Failure == Error {
// Start a new Task with a timeout. If the timeout expires before the operation is
// completed then the task is cancelled and an error is thrown.
init(priority: TaskPriority? = nil, timeout: TimeInterval, operation: @escaping @Sendable () async throws -> Success) {
self = Task(priority: priority) {
try await withThrowingTaskGroup(of: Success.self) { group -> Success in
group.addTask(operation: operation)
group.addTask {
try await _Concurrency.Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000))
@miguelmota
miguelmota / README.md
Last active May 9, 2024 14:36
Arch linux google authenticator 2FA

Install google authenticator

sudo pacman -S libpam-google-authenticator
sudo pacman -S qrencode

Edit pam config

@aidos-dev
aidos-dev / README.md
Last active May 9, 2024 14:35
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@kishmakov
kishmakov / Makefile
Last active May 9, 2024 14:35
Shared libraries and Address Sanitizer (ASAN)
SAN_CMP := -fno-omit-frame-pointer -fsanitize=address
SAN_STAT := -static-libstdc++ -static-libasan
BIN_CMP := -std=c++11 -c -I. main.cpp -O -g3 -o main.o
LIB_CMP := -std=c++11 my.cpp -o libmy.so -shared -fPIC -g3
RUN := LD_LIBRARY_PATH=. ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer)
PRELOAD := LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.1
lib-gcc:
@meigwilym
meigwilym / CQRS.md
Last active May 9, 2024 14:35
CQRS, Task Based UIs, Event Sourcing agh!

CQRS, Task Based UIs, Event Sourcing agh!

Posted by gregyoung on February 16, 2010

Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.

CQRS Command and Query Responsibility Segregation

Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).

@JustinByrne
JustinByrne / laravel-ci-cd-workflow.yml
Last active May 9, 2024 14:34
Github Action to test laravel and then compile the assets to a production branch
name: CI/CD workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
testing:
@booleangate
booleangate / a-salesforce-oauth-2.0-jwt-bearer-token-flow-walk-through.md
Last active May 9, 2024 14:34
Salesforce OAuth 2.0 JWT Bearer Token Flow walk-through

Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through

This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.

Prerequisites

Create an RSA x509 private key/certification pair