Skip to content

Instantly share code, notes, and snippets.

@dannberg
dannberg / obsidian-daily-note-template.txt
Last active May 18, 2024 18:35
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@efstathiosntonas
efstathiosntonas / AudioManager.ts
Created May 17, 2024 07:40
Audio Player Chat Message with react-native-awesome-slider & react-native-audio-player-recorder
import AudioRecorderPlayer, { PlayBackType } from "react-native-audio-recorder-player";
import { isIOS } from "utils/utils";
type Callback = (args: { data?: PlayBackType; status: AudioStatus }) => void;
type Path = string | undefined;
export enum AudioStatus {
PAUSED = "PAUSED",
PLAYING = "PLAYING",
RESUMED = "RESUMED",
@Ravarcheon
Ravarcheon / spectralRotation.py
Created May 18, 2024 13:23
rotates an audio file by 90 degrees in the spectrum while being a reversible process with minimal loss (only floating point errors which are like -150 dB but thats literally silence ahaha~)
import numpy as np
import soundfile as sf
from scipy.fftpack import fft, ifft
def rotateSignal(signal,flip):
if flip:
signal = signal[::-1]
x = np.concatenate((signal, signal[1:][::-1])) # concatenating the array with a reverse of itself makes it such that the fourier transform doesn't layer over a reversed version of itself in the inverse fft
rotSig = np.real(ifft(x))
@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active May 18, 2024 18:32
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@Justasic
Justasic / inizh.patch
Last active May 18, 2024 18:30
This patches Command & Conquer: Generals Zero Hour's inizh.big file to create a GLA super worker which can build all the command centers of all factions (basically a huge cheat)
diff -r -u /tmp/Data/INI/CommandButton.ini /DataStorage/Games/Data/INI/CommandButton.ini
--- /tmp/Data/INI/CommandButton.ini 2019-07-05 21:57:33.363905699 -0700
+++ /DataStorage/Games/Data/INI/CommandButton.ini 2019-07-05 21:54:43.440602319 -0700
@@ -2632,6 +2632,15 @@
DescriptLabel = CONTROLBAR:ToolTipGLABuildWorker
End
+CommandButton Command_ConstructGLASpecialWorker
+ Command = UNIT_BUILD
+ Object = GLASpecialInfantryWorker
@ih2502mk
ih2502mk / list.md
Last active May 18, 2024 18:29
Quantopian Lectures Saved
@keijiro
keijiro / gpd_win.md
Last active May 18, 2024 18:29
My notes on using GPD Win

image

GPD Win is a really enjoyable piece of hardware.

Windows 10 Clean Installation

@davidfowl
davidfowl / MinimalAPIs.md
Last active May 18, 2024 18:28
Minimal APIs at a glance
@kayabaNerve
kayabaNerve / deanon_dero.md
Created May 17, 2024 14:53
Deanonymization of the Dero Network

The Dero Protocol

The protocol uses a pair of rings, one for the senders, one for the receivers, represented as a singular ring. With each transfer, a list of ElGamal ciphertexts is provided for all accounts within the joint ring. This ElGamal ciphertext is formed as r * G, (r * K) + (a * G), where r is some randomness, K is the key for the account the ciphertext is for, and a is the amount.

The Dero Wallet Protocol

Dero offers an 'encrypted message' with every transaction. Even if the user does not explicitly provide one, a message will exist (either with internally provided values or left empty). For the only defined type of message, the message is encoded as the index of the sender, a CBOR-encoded object, and zero-padding. The message is encrypted with the Chacha20 stream created by a key of H(H(r * K) || K) where r is some randomness and K is the key for the account the ciphertext is for.

The Issue