Skip to content

Instantly share code, notes, and snippets.

@twang2218
twang2218 / Dockerfile
Created July 14, 2016 16:00
Docker cron example
FROM python:3.5.2
ENV TZ=Asia/Shanghai
RUN apt-get update \
&& apt-get install -y cron \
&& apt-get autoremove -y
COPY ./cronpy /etc/cron.d/cronpy
CMD ["cron", "-f"]
@zerda
zerda / .gitlab-ci.yml
Last active October 8, 2020 04:05
Gitlab CI for spring boot project
image: maven:3.3-jdk-8-alpine
cache:
key: "$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
paths:
- .m2/
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2"
import pytesseract
import sys
import argparse
try:
import Image
except ImportError:
from PIL import Image
from subprocess import check_output
@blacktwin
blacktwin / new_kill_trans_pause.py
Last active October 17, 2019 04:13
Kill Plex paused video transcoding streams using PlexPy.
"""
Kill Plex paused video transcoding streams.
PlexPy > Settings > Notification Agents > Scripts > Bell icon:
[X] Notify on playback pause
PlexPy > Settings > Notification Agents > Scripts > Gear icon:
Playback Pause: new_kill_trans_pause.py
"""
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active July 19, 2025 15:15
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@tstellanova
tstellanova / video_rec_python_rpi3.md
Last active April 4, 2025 14:00
Capture video and stills from python using a USB webcam and python on the rpi3 or similar

Setup: Install pyuvc

This is a wrapper around libuvc the USB video class, for USB-connected cameras.

Install pyuvc and all its dependencies:

  • sudo apt-get install libusb-1.0 cython
  • Install libturbojpeg from source (there are some related packages available, but not the one libuvc depends on)
wget -O libjpeg-turbo.tar.gz https://sourceforge.net/projects/libjpeg-turbo/files/1.5.1/libjpeg-turbo-1.5.1.tar.gz/download
tar xvzf libjpeg-turbo.tar.gz
cd libjpeg-turbo-1.5.1