Skip to content

Instantly share code, notes, and snippets.

@dawid-czarnecki
dawid-czarnecki / firefly-iii-backuper.sh
Last active May 5, 2024 09:18
Script to backup Firefly III database, uploads and config files installed with docker-compose
#!/bin/bash
files_to_backup=(.env .db.env .fidi.env docker-compose.yml )
info() { echo -e "\\033[1;36m[INFO]\\033[0m \\033[36m$*\\033[0m" >&2; }
warn() { echo -e "\\033[1;33m[WARNING]\\033[0m \\033[33m$*\\033[0m" >&2; }
fatal() { echo -e "\\033[1;31m[FATAL]\\033[0m \\033[31m$*\\033[0m" >&2; exit 1; }
intro () {
echo " ====================================================="
@cjddmut
cjddmut / EasingFunctions.cs
Last active May 5, 2024 09:12
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@cowboy
cowboy / inception.js
Last active May 5, 2024 09:10
JavaScript: inception(inception);
function inception(f) {
try {
return 'recursion puts the "' + f.name + '" in "' + f(f) + '"';
} catch (e) {
return '';
}
}
@piaoger
piaoger / maxstacksize.html
Created March 21, 2014 02:32
Get max call stack size in browser
<!-- A script to get max call stack size in browser
In my Macbook pro
Firefox 28:
maxStackSize = 350801 (dynamic, but always above 300000)
error: InternalError: too much recursion
Safari 7.0.2
maxStackSize = 58034
error: RangeError: Maximum call stack size exceeded.
Chrome 33:
@boodle
boodle / Making Apple Developer certificates on Linux.md
Last active May 5, 2024 09:07
Making Apple Developer certificates on Linux
  1. Create a new directory;
mkdir Apple\ Enterprise
cd Apple\ Enterprise
  1. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active May 5, 2024 09:06
C++ Memory Management Resource List
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 5, 2024 09:04
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 5, 2024 09:00
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@yiwenl
yiwenl / bezier.glsl
Last active May 5, 2024 08:57
Bezier curve in GLSL
// bezier curve with 2 control points
// A is the starting point, B, C are the control points, D is the destination
// t from 0 ~ 1
vec3 bezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) {
vec3 E = mix(A, B, t);
vec3 F = mix(B, C, t);
vec3 G = mix(C, D, t);
vec3 H = mix(E, F, t);
vec3 I = mix(F, G, t);
# [filter size, stride, padding]
#Assume the two dimensions are the same
#Each kernel requires the following parameters:
# - k_i: kernel size
# - s_i: stride
# - p_i: padding (if padding is uneven, right padding will higher than left padding; "SAME" option in tensorflow)
#
#Each layer i requires the following parameters to be fully represented:
# - n_i: number of feature (data layer has n_1 = imagesize )
# - j_i: distance (projected to image pixel distance) between center of two adjacent features