Skip to content

Instantly share code, notes, and snippets.

View Erdack54's full-sized avatar

Erdack54 Erdack54

View GitHub Profile
@gangefors
gangefors / Install FreeNAS SCALE on a partition and create a mirror.md
Last active November 2, 2024 16:21
How to install TrueNAS SCALE on a partition instead of the full disk

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

@jack828
jack828 / mdns-setup.sh
Last active December 12, 2023 18:54
TrueNAS Jail mDNS Setup Kickstarter
# An explanation of this script is available on my blog https://jackburgess.dev/blog/truenas-jails-access-via-mdns
# This allows you a nice way of connecting to your jails via their hostname using mDNS
# e.g. for Netdata, which runs on port 3000, you can access it on your jail via:
# http://<jail ip>:3000/
# But wouldn't it be nice to access it on
# http://jailhostname.local/
#
# Oneliner to kickstart
# pkg install -y curl && curl --silent https://gist.githubusercontent.com/jack828/b8375b16b6fb9eae52201d4deb563ab7/raw | /bin/sh -s PORT
@osipxd
osipxd / !paper-versions.md
Last active October 30, 2024 11:27
Paper versions links
@rordi
rordi / root-password-MariaDB-docker-compose.md
Last active October 13, 2024 16:11
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d
@finalwebsites
finalwebsites / download-example.php
Last active December 21, 2022 01:26
PHP download file script code example
<?php
echo '
<a href="http://mydomain.com/download.php?download_file=some_file.pdf">PHP download file</a>';
@gsurrel
gsurrel / Galaxy_S8_Debloat.sh
Last active August 8, 2024 13:25
Samsung Galaxy S8 debloat list
###########################
# Phone apps and services #
###########################
adb shell "cmd package install-existing com.android.stk" # SIM toolkit
adb shell "cmd package install-existing com.android.stk2" # SIM toolkit (maybe for dual-sim devices)
adb shell "cmd package install-existing com.sec.android.app.simsettingmgr" # SIM card manager, maybe required, contains configuration and settings for handling dual SIM (give a SIM an icon, a name, and so on)
adb shell "pm uninstall -k --user 0 com.samsung.android.smartcallprovider" # The 4th tab in the Phone app for 'local places'
adb shell "pm uninstall -k --user 0 com.sec.vsim.ericssonnsds.webapp" # NSDSWebApp. The Non Sim Device Solution (NSDS) is linked to VoLTE and VoWifi (Wifi Calling). NSDS allows connecting non sim devices to IMS core: https://uk.linkedin.com/in/hemant-kumar-dewnarain-2b779679
adb shell "pm uninstall -k --user 0 com.android.cts.ctsshim" # Part of the Android Compatibility Test Suite: https://source.android.com/compatibility/cts/setu
@hyrious
hyrious / restore-desktop-ini.md
Last active October 30, 2024 03:56
restore desktop.ini if some guy messed them up

Take %UserProfile%\Desktop\desktop.ini for example.

  1. Create a desktop.ini file with content below and saved in UTF-16 LE with BOM. Hopefully notepad.exe has such choice to use the right encoding.
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769
IconResource=%SystemRoot%\system32\imageres.dll,-183
@ghostbear
ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active September 28, 2024 15:43
[Spotify] How to limit the cache size (Windows/Mac OS)

Credit to MadHatter

WINDOWS

Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
@rigelk
rigelk / peertube.conf
Last active August 29, 2024 20:52
a now OUTDATED httpd/Apache vhost to run PeerTube | note that only Nginx is supported by the PeerTube team, and with this or any other Apache configuration, you will likely get NO SUPPORT.
# requires WebSocket support with `a2enmod proxy_wstunnel`
# check https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=modern&openssl=1.1.1d&hsts=false&ocsp=false&guideline=5.6 for hardening security
<VirtualHost *:80 [::]:80>
ServerName peertube.example.com
ServerAdmin webmaster@example.com
Protocols h2c http/1.1
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
@matthewzring
matthewzring / markdown-text-101.md
Last active November 4, 2024 18:21
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers: