Skip to content

Instantly share code, notes, and snippets.

@hjbotha
hjbotha / free_ports.sh
Last active April 22, 2024 14:52
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
@manishsongirkar
manishsongirkar / add field in media upload
Created October 18, 2012 10:55
Add Custom input field in media uploader.
/**
* Add Photographer Name and URL fields to media uploader
*
* @param $form_fields array, fields to include in attachment form
* @param $post object, attachment record in database
*
* @return $form_fields, modified form fields
*/
function rtp_attachment_field_credit( $form_fields, $post ) {
$form_fields['rtp-photographer-name'] = array(