Skip to content

Instantly share code, notes, and snippets.

View kayvanaarssen's full-sized avatar

Kay van Aarssen kayvanaarssen

View GitHub Profile
@plembo
plembo / resticbackup.md
Last active March 2, 2024 18:55
Restic backup

Backups with restic

We just recently began to use restic as our main backup solution at home. I'm posting this mostly to document the configuration for myself. Anyone interested in using restic should thoroughly read the documentation before proceeding.

By default, backups are run with encryption and compression enabled. Although many people have all hosts in a multi-host network sharing a single repo, I chose to separate them out (to limit the impact of any future data corruption and simplify security configuration).

@joshuaspence
joshuaspence / README.md
Last active February 2, 2024 13:37
UXG on-boot-script

on-boot-script is a popular method for extending the UniFi Dream Machine to execute init.d style scripts on boot. It works by installing a custom systemd service into the unifi-os container, but this method doesn't work on the UXG-Pro. The bootstrap.sh script below allows similar functionality to work on the UXG-Pro using a different approach (modify the Docker entrypoint script in the main uxg-setup container).

To install, either copy bootstrap.sh onto the UXG-Pro and execute it with sh bootstrap.sh or execute the script directly with curl -LsS https://gist.github.com/joshuaspence/a745426ab7d72631b1a4313f15e1774a/raw/bootstrap.sh | sh.

@thesuhu
thesuhu / how-to-build-and-install-latest-curl-version-on-centos.md
Last active August 15, 2024 12:44
How to Build and Install Latest cURL Version CentOS

How to Build and Install Latest cURL Version on CentOS

# Written by The Suhu (2021).

# Tested on CentOS 7 and CentOS 8

Previously I've written about How to Build and Install Latest cURL Version on Ubuntu. In this article in this article explain how to build and install latest cURL version on CentOS.

@eksiscloud
eksiscloud / mysql
Created April 22, 2020 17:22
Monit: MariaDB and MySQL
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group database
group mysql
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host localhost port 3306 protocol mysql with timeout 15 seconds for 3 times within 4 cycles then restart
if failed unixsocket /var/run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart
if 5 restarts with 5 cycles then timeout
depend mysql_bin
depend mysql_rc
@ssddanbrown
ssddanbrown / export-books.php
Last active August 19, 2024 11:15
BookStack-Export-Books
#!/usr/bin/env php
<?php
// API Credentials
// You can either provide them as environment variables
// or hard-code them in the empty strings below.
$apiUrl = getenv('BS_URL') ?: ''; // http://bookstack.local/
$clientId = getenv('BS_TOKEN_ID') ?: '';
$clientSecret = getenv('BS_TOKEN_SECRET') ?: '';
@kayvanaarssen
kayvanaarssen / List of ransomware extensions
Created November 30, 2017 08:18 — forked from CHEF-KOCH/List of ransomware extensions
List of ransomware extensions
File extensions appended to files:
.ecc, .ezz, .exx, .zzz, .xyz, .aaa, *.cryp1, .abc, .ccc, .vvv, *.zepto, .xxx, .ttt, .micro, .encrypted, .locked, .crypto, _crypt, .crinf, .r5a, .XRNT, .XTBL, .crypt, .R16M01D05, .pzdc, .good, .LOL!, .OMG!, .RDM, .RRK, .encryptedRSA, .crjoker, .EnCiPhErEd, .LeChiffre, .keybtc@inbox_com, .0x0, .bleep, .1999, .vault, .HA3, .toxcrypt, .magic, .SUPERCRYPT, .CTBL, .CTB2, .diablo6, .Lukitus, .locky or 6-7 length extension consisting of random characters.
Known ransom note files:
HELPDECRYPT.TXT, HELP_YOUR_FILES.TXT, HELP_TO_DECRYPT_YOUR_FILES.txt, RECOVERY_KEY.txt HELP_RESTORE_FILES.txt, HELP_RECOVER_FILES.txt, HELP_TO_SAVE_FILES.txt, DecryptAllFiles.txt DECRYPT_INSTRUCTIONS.TXT, INSTRUCCIONES_DESCIFRADO.TXT, How_To_Recover_Files.txt YOUR_FILES.HTML, YOUR_FILES.url, encryptor_raas_readme_liesmich.txt, Help_Decrypt.txt DECRYPT_INSTRUCTION.TXT, HOW_TO_DECRYPT_FILES.TXT, ReadDecryptFilesHere.txt, Coin.Locker.txt _secret_code.txt, About_Files.txt, Read.txt, ReadMe.txt, DECRYPT_ReadM
@fernandoaleman
fernandoaleman / redis-cannot-allocate-memory.txt
Last active March 1, 2023 14:14
redis bgsave failed because fork Cannot allocate memory
Modify /etc/sysctl.conf and add
vm.overcommit_memory=1
Then restart sysctl by:
$ sudo sysctl -p /etc/sysctl.conf
@kaloprominat
kaloprominat / macos: manage add list remove login items apple script
Last active July 22, 2024 20:55
macos: manage add list remove login items apple script
# applescript
# add login item
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}'
# delete login item
osascript -e 'tell application "System Events" to delete login item "itemname"'
# list loginitems
osascript -e 'tell application "System Events" to get the name of every login item'