Skip to content

Instantly share code, notes, and snippets.

View starbuck93's full-sized avatar
:bowtie:

Adam Starbuck starbuck93

:bowtie:
View GitHub Profile
@blacktwin
blacktwin / find_unwatched.py
Last active December 11, 2018 03:40
Find what was added TFRAME ago and not watched using PlexPy.
"""
Find what was added TFRAME ago and not watched using PlexPy.
"""
import requests
import sys
import time
@blacktwin
blacktwin / notify_added_lastweek.py
Last active December 18, 2018 16:06
Send an email with what was added to Plex in the past week using PlexPy.
"""
Send an email with what was added to Plex in the past week using PlexPy.
Email includes title (TV: Show Name: Episode Name; Movie: Movie Title), time added, image, and summary.
"""
import requests
import sys
import time
import os
from email.mime.text import MIMEText
@blacktwin
blacktwin / userplays_weekly_reporting.py
Created February 9, 2017 18:48
Use PlexPy to count how many plays per user occurred this week and send email via PlexPy.
"""
Use PlexPy to count how many plays per user occurred this week.
Notify via PlexPy Notification
"""
import requests
import sys
import time
TODAY = int(time.time())
@pashinin
pashinin / gist:f98bc62a727fb517b48baf9d443bcebb
Last active February 15, 2024 07:28
windows shit hostnames to block
# -*- mode:conf-unix -*-
### hosts win10 extra
### More info: https://github.com/crazy-max/WindowsSpyBlocker
0.0.0.0 answers.microsoft.com
0.0.0.0 apps.skype.com
0.0.0.0 az361816.vo.msecnd.net
0.0.0.0 az512334.vo.msecnd.net
0.0.0.0 cdn.content.prod.cms.msn.com
0.0.0.0 choice.microsoft.com
@silasrm
silasrm / gist:3da655045b899a858eae4f4463755f5c
Last active January 31, 2023 16:03 — forked from maccath/gist:3981205
Split PDF to individual pages using FPDI and FPDF
<?php
/**
* Split PDF file
*
* <p>Split all of the pages from a larger PDF files into
* single-page PDF files.</p>
*
* @package FPDF required http://www.fpdf.org/
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/
@hasanbayatme
hasanbayatme / README.md
Last active December 23, 2023 20:14
Easy to use Bash Script to Install LAMP stack on Ubuntu.

Installation

Automatic

Run the below command in terminal:

wget --no-cache -O - https://gist.github.com/EmpireWorld/737fbb9f403d4dd66dee1364d866ba7e/raw/install-lamp.sh | bash
@aaronymousX
aaronymousX / ServerSetup.sh
Last active December 16, 2020 17:45
ServerSetup.sh
#!/bin/bash
clear
# Checks for ROOT privileges
echo "============================================"
echo "Checking for ROOT"
echo "============================================"
if [ "$USER" = "root" ]
then
echo "Success! You are ROOT"
else
@gladx
gladx / human_filesize.php
Last active April 8, 2021 12:30
Human readable file size in php
<?php
// http://jeffreysambells.com/2012/10/25/human-readable-filesize-php + some edit
// https://gist.github.com/liunian/9338301
function human_filesize($bytes, $decimals = 2)
{
if ($bytes < 1024) {
return $bytes . ' B';
}
$factor = floor(log($bytes, 1024));
#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do
version: '3.1'
services:
unifi:
container_name: unifi
restart: unless-stopped
image: linuxserver/unifi
volumes:
- /srv/docker/unifi:/config
environment:
- PGID=0