Skip to content

Instantly share code, notes, and snippets.

View RealDekkia's full-sized avatar

RealDekkia

View GitHub Profile
@ravnoor
ravnoor / unraid_proftpd_sftp.sh
Last active January 14, 2023 19:26
unraid_proftpd_sftp.sh
# https://forums.unraid.net/topic/24356-proftpd-plugin-for-unraid-v68x/?do=findComment&comment=559588
# To enable sftp:
# open a shell on your unraid server and issue the following commands
cd /etc/ssh
ssh-keygen
# Enter the name of the keyfile (sftp_rsa_key) and no passphrase.
# You will get two files sftp_rsa_key and sftp_rsa_key.pub. The public
# key needs to be converted to another format to make it usable by
@xerpi
xerpi / 3DS_Linux_build_instructions.md
Last active March 27, 2024 12:02
3DS Linux build instructions

Step 1: Compiling or Downloading the toolchain

Step 1.a: If you choose to download a pre-compiled toolchain (only for Linux x86-64)

  • Go to https://toolchains.bootlin.com
  • Select arch: armv6-eabihf
  • Select libc: glibc
  • Download bleeding-edge
  • Uncompress it (for example to /opt)
  • Add the bin/directory of the toolchain to $PATH
  • In my case: export PATH=$PATH:/opt/armv6-eabihf--glibc--bleeding-edge-2020.08-1
@actuino
actuino / raspberry-tft-9.95-ili9488.md
Last active July 16, 2023 07:51
Cheap 3.95 TFT Screen with ili9488 from mcufriend on a Raspberry Pi Zero
@JonathanPorta
JonathanPorta / dd-examples.md
Last active April 19, 2024 17:22
DD Backup, Compress, and Restore

Backup/Image

Make sure the if value is correct! If doing this over SSH then open a TMUX session first... or else...

dd if=/dev/YOUR-DEVICE conv=sync,noerror bs=64K | gzip -c  > /home/portaj/macbook.img.gz

NOTE: You might not want to compress the image. It just means you have to uncompress it later to mount it. If you're planning to access the data soon, or frequently, don't compress it.

Saving a copy of the drive geometry

Save it in the same directory as the compressed image so later on if you decide you want to mount or extract data from the image you can see the partition structure without having to decompress the whole image. There might be some other ways to mount a compressed image.

@x-strong
x-strong / Date_Time_Regex.js
Last active February 3, 2019 14:35
"yyyy-MM-dd HH:mm:ss" format datetime regular expression.exactly match Feb‘s date no mater leap year or not. “2013-04-12 22:50:00”格式的时间正则表达式,平年闰年2月日期亦完全匹配正确。
//yyyy-MM-dd HH:mm:ss
var dateTimeRegex=/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)\s([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;
//yyyy-MM-dd
var dateRegex=/^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$/;
//yyyyMMdd
var dateRegex2 = /^(?:(?!0000)[0-9]{4}(?:(?:0[1-9]|1[0-2])(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])(?:29|30)|(?:0[13578]|1[02])31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)0229)$/;
//HH:mm:ss