Skip to content

Instantly share code, notes, and snippets.

View michealespinola's full-sized avatar
:octocat:

Micheal Espinola michealespinola

:octocat:
  • Las Vegas, NV
  • 07:25 (UTC -07:00)
View GitHub Profile
@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)
@erickyun
erickyun / ytdl trimmerV1.bat
Last active February 7, 2024 16:11
Download only part of a youtube video
@setlocal
@echo off
set /p "URL=Enter URL here: "
set /p "START_TIME=Enter START_TIME here: "
set /p "END_TIME=Enter END_TIME here: "
set /p "END_FILENAME=Enter END_FILENAME here: "
set "VIDEO_URL= "
#!/usr/bin/env bash
set -e
# Purpose: Update Server certificates
# find certificates that might need an update
# cd / && find . -name "*.pem"
declare -a CERT_DIRS
CERT_DIRS=(\ '/usr/syno/etc/certificate/AppPortal/VideoStation/' \ '/usr/syno/etc/certificate/AppPortal/AudioStation/' \ '/usr/syno/etc/certificate/AppPortal/FileStation/' \ '/usr/syno/etc/certificate/AppPortal/DownloadStation/' \ '/usr/local/etc/certificate/DirectoryServer/slapd/' \ '/usr/local/etc/certificate/LogCenter/pkg-LogCenter/' \ '/usr/local/etc/certificate/WebStation/vhost_225bb9ca-d884-44dd-a0f9-83ff557b95d6/' \ '/usr/local/etc/certificate/CloudStation/CloudStationServer/' \ '/usr/syno/etc/certificate/smbftpd/ftpd/' \ '/usr/syno/etc/certificate/system/FQDN/' \ '/usr/syno/etc/certificate/system/default/' )
urlbase='https://cert.example.com/'
filebase='synology'
base="${urlbase}${filebase}"
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active June 3, 2024 09:37
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@sidneys
sidneys / youtube_format_code_itag_list.md
Created January 20, 2018 11:12
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@JonnyWong16
JonnyWong16 / add_label_recently_added.py
Last active May 3, 2024 07:09
Automatically add a label to recently added items in your Plex library
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Automatically add a label to recently added items in your Plex library
# Author: /u/SwiftPanda16
# Requires: requests
# Tautulli script trigger:
# * Notify on recently added
# Tautulli script conditions:
# * Filter which media to add labels to using conditions. Examples:
@blacktwin
blacktwin / delete_watched_TV.py
Created April 10, 2017 14:02
From a list of TV shows, check if users in a list has watched shows episodes. If all users in list have watched an episode of listed show, then delete episode
"""
From a list of TV shows, check if users in a list has watched shows episodes.
If all users in list have watched an episode of listed show, then delete episode.
"""
import requests
import sys
import os
@AgentOak
AgentOak / youtube_formats.md
Last active June 28, 2024 01:51
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@onedr0p
onedr0p / simple_convert.py
Last active June 8, 2024 22:09
A simple script to convert media files to MP4 for a better Plex experience
# Python 2.7
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging