Skip to content

Instantly share code, notes, and snippets.

@CaffTech
CaffTech / memos.sh
Created August 13, 2025 12:57
A command line BASH script post to Memos
#!/bin/bash
# A BASH script to post memos from the command line.
# It is a conversion of a PowerShell script from: https://www.reddit.com/r/selfhosted/comments/1mohkot/i_love_self_hosting_memos_great_api_for_super/
# Needs yout own instance of Memos - https://www.usememos.com/
# Default environment variables
MEMOS_URI="${MEMOS_URI:-https://YOUR_DOMAIN.com}"
MEMOS_TOKEN="${MEMOS_TOKEN:-YOUR_API_TOKEN}"
@ddyykk
ddyykk / backup_firefly_docker.md
Last active November 12, 2025 10:24
The scripts used for backup and restore data in Firefly III docker containers. Steps are in the .md file.

Usage Instructions:

  1. Backup Script (backup_firefly_docker.sh):

    • Run the script: ./backup_firefly_docker.sh
    • Enter the database password when prompted.
    • The script will create a backup of the database and uploads directory, compress it, and verify its contents. The files will be in the directory of your current path. (The path when you run the script)
    • The backup file and its checksum will be saved in the firefly_backups directory.
  2. Restore Script (restore_firefly_docker.sh):

@jpfl
jpfl / ftt.md
Created October 22, 2024 14:53
fast track trading math

i did the math on fast track trading

i can prove ftt and its current rules are offering a mathematically beatable game. for every dollar scott collects in revenue he is taking on about five dollars of statistical net liability. this explains why he simply will not be able to make traders whole and it's snowballing with every account he sells. not only does he need a surge of new signups to pay existing liabilities but the attached debt to each new account is insurmountable. every account scott sells for $100 he's long term statistically losing about $500.

this is the largest negative house edge and the biggest blunder i've seen a company make. the math doesn't work. he will not be able to sustain this and i fear it will end up in a netflix documentary and civil or criminal judgments against scott.

the gist is, with the current rules of making 5% before losing 5% with an end of day trailing drawdown from equity highs, and with the 20% consistency rule, anyone with an equal distant target and stop and 50%

Option Explicit
Private Declare PtrSafe Function CoCreateGuid Lib "ole32" (ByRef GUID As Byte) As Long
Private has_more As Boolean
Public Sub SendToJoplin()
Dim sToken As String
Dim sUrl As String
Dim sMailFolderName As String
Dim sNotesFolderName As String
@pengx17
pengx17 / export.js
Last active November 6, 2025 18:15
Export app.affine.pro and import into AFFiNE client
(async () => {
async function blobToBase64(blob) {
return await new Promise((resolve) => {
const reader = new FileReader();
reader.onload = function() {
resolve(reader.result.split(',')[1]);
}
reader.readAsDataURL(blob);
});
}
@nischay876
nischay876 / 1.sh
Last active March 2, 2023 20:52
Migrate Hestia Control Panel To New VPS
echo "Create Backup For all Users (Run On VPS 1)"
v-backup-users
echo "Backup Job Done"
#!/bin/bash
# Script that sends an alert email when any disk's used space is over a certain
# limit.
# The first parameter to this script is the min disk space usage percentage for
# when the alerts kicks in.
# The second parameter is the email address the alert message should be sent
# to.
#
# Can be configured in a crontab like this:
@rochacbruno
rochacbruno / gruvbox-dark.micro
Created April 21, 2022 18:49
Gruvbox Dark Theme for Micro Editor
color-link default "#ebdbb2,#1d2021"
color-link comment "#928374,#1d2021"
color-link symbol "#d79921,#1d2021"
color-link constant "#d3869b,#1d2021"
color-link constant.string "#b8bb26,#1d2021"
color-link constant.string.char "#b8bb26,#1d2021"
color-link identifier "#8ec07c,#1d2021"
color-link statement "#fb4934,#1d2021"
color-link preproc "#fb4934,235"
color-link type "#fb4934,#1d2021"
@SniperSister
SniperSister / readmedia.php
Last active May 23, 2025 09:13
readmedia.php for Joomla 4 and 5
<?php
/**
* @copyright Copyright (C) 2018 David Jardin - djumla GmbH
* @package Readmedia
* @version 1.0.0
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.djumla.de
*
* 1.0.0-KRJE
* - Updated version to support video streams in Safari (Webkit) - Viktor Vogel - https://www.kubik-rubik.de
@ychaouche
ychaouche / Spamassassin rules description
Last active November 7, 2025 21:20
Spamassassin rules description
Note:
to keep this list automatically updated,
I turned it into a repo which is automatically updated via cron.
see https://github.com/ychaouche/spamassassin-rules-description
AC_BR_BONANZA Too many newlines in a row... spammy template
ACCESSDB Bericht zou gevangen zijn door accessdb
ACCESSDB Ce message aurait �t� bloqu� par accessdb
ACCESSDB Mensagem teria sido pega pela accessdb
ACCESSDB Message would have been caught by accessdb