Skip to content

Instantly share code, notes, and snippets.

View 007revad's full-sized avatar

Dave Russell 007revad

  • Australia
  • 14:32 (UTC +10:00)
View GitHub Profile
@emiller
emiller / git-mv-with-history
Last active April 17, 2024 21:06
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@refo
refo / bash-filepath-parts.md
Last active February 2, 2024 11:57
Extract file name / file path parts using bash

Extract given file path into its parts

Assuming, file passed as a parameter

path=$1

following script will extract file path into parts

@hjbotha
hjbotha / free_ports.sh
Last active July 10, 2024 17:33
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@mblythe86
mblythe86 / plex_cleanup.rb
Created September 25, 2020 16:09
Clean unused posters/art/banners from Plex
#!/usr/bin/env ruby
# At least for movies, it looks like it copies the 'selected' stuff into the
# _stored/ folder. It also seems to use the _combined/ folder for access.
# so, I shoud be able to delete anything that's not those two.
# And after that, in the _combined folder, I can/should delete any broken links
# and remove them from <art> and <posters> in Info.xml.
# remove <reviews> from Info.xml too, since it seems to be unused.
# As far as I can tell, extras.xml can just be deleted?
# Same for Artists
@Rhilip
Rhilip / DSM_6.2_API.json
Last active February 5, 2024 10:45
DSM API list
{
"data": {
"SYNO.API.Auth": {
"maxVersion": 6,
"minVersion": 1,
"path": "auth.cgi"
},
"SYNO.API.Encryption": {
"maxVersion": 1,
"minVersion": 1,
@halliba
halliba / downgrade-dsm-package-with-depenent-packages.md
Created March 31, 2021 18:02
How to downgrade a Synology DSM package that has dependent packages.

How to downgrade a Synology DSM package that has dependent packages

Initial Situation

  • Package OpenERP, installed in version 7.0.0-0106
  • Package Python Modules, previously installed in version 0114, was automatically updated to version 0115
  • The update caused OpenERP to fail, due to missing compatibility with Python Modules in version 0115
  • No update available for OpenERP because it is EOL and replaced by https://www.odoo.com/

Problem

Synology DSM is not capable of downgrading individual packages and you can not uninstall a package (to install the older version), when there are packages installed, that depend on the package to be downgraded.

@killerbees19
killerbees19 / archive-synology-com.txt
Last active May 28, 2023 13:48
[2023-01-16] All download URLs from archive.synology.com and sourceforge.net/projects/dsgpl
This file has been truncated, but you can view the full file.
https://global.download.synology.com/download/Addons/NoteStationClipper/1.0-0025/NoteStationClipper-1.0-0025.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0046/NoteStationClipper-2.0-0046.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0049/NoteStationClipper-2.0-0049.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0064/NoteStationClipper-2.0-0064.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0066/NoteStationClipper-2.0-0066.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0091/NoteStationClipper-2.0-0091.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0092/NoteStationClipper-2.0-0092.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0093/NoteStationClipper-2.0-0093.crx
https://global.download.synology.com/download/Addons/NoteStationClipper/2.0-0094/NoteStationClipper-2.0-0094.crx
https:/
@007revad
007revad / synology-shutdown-temperature.md
Created May 7, 2023 05:55 — forked from borekb/synology-shutdown-temperature.md
How to increase the shutdown temperature on Synology NAS

Synology: how to increase shutdown temperature

My Synology DS218+ runs with a single SSD disk that has an operating temperature range of 0–70 °C, which is common for SSDs. Synology, however, has a default shutdown temperature of 61 °C, probably due to HDDs and some lazy programming.

I'm a very light user of NAS – all I want is a network attached storage and silence. My DS218+ has one 2 TB SSD disk in it and I've changed the system fan for a quieter / slower one.

Everything runs fine but about once in a month, I get this notification:

[Synology DS218+]Synology shut down due to disk overheating. >

@mietzen
mietzen / SynoCommunity-autoupdate.md
Last active June 9, 2024 06:16
A shell script to auto update SynoCommunity Packages

Auto Update SynoCommunity Packages

I always had the problem that synology doesn't let us auto update 3rd party packages such as the ones from SynoCommunity, so I wrote a shell script to auto update SynoCommunity Packages:

#! /bin/bash -e

PATH="/bin:/usr/syno/bin:${PATH}"

SYSTEM_PKGS=$(synopkg checkupdateall)