Skip to content

Instantly share code, notes, and snippets.

View francesco-plt's full-sized avatar
🎯
Focusing

Francesco Pallotta francesco-plt

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python3
import requests
import re
import os
import timeit
import json
from multiprocessing.dummy import Pool as ThreadPool
from bs4 import BeautifulSoup as bs
from getconf import *
from atclibs import *
@dkarchmer
dkarchmer / supervisord.conf
Created April 26, 2016 17:01
Sample supervisord conf for running a python script in the background
; Assumes dockerfile with:
; ENTRYPOINT ["/usr/bin/supervisord", "-c", "/var/app/supervisord.conf"]
[supervisord]
;logfile=/var/app/logs/ ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=5 ; (num of main logfile rotation backups;default 10)
loglevel=debug ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
@drblue
drblue / fix_onedrive.sh
Last active April 3, 2025 04:42
Fix OneDrive for Mac CPU usage
#!/bin/bash
## Fix OneDrive for Mac CPU usage
##
## Seems this is still a problem 5 years later after I created this little gist.
## I have long since stopped using OneDrive (luckily), but according to
## comments below, I have added the new path for OfficeFileCache for macOS
## Mojave (10.14) and Catalina (10.15).
## Run this on macOS Mojave (10.14) and Catalina (10.15)
find ~/Library/Containers/ -type d -name OfficeFileCache -exec rm -r {} +
@nicwolff
nicwolff / back 10 seconds
Created July 24, 2013 00:13
AppleScripts to skip forward 30 seconds or back 10 seconds in either VLC or QuickTime Player
if application "VLC" is running then
tell application "VLC"
step backward
end tell
end if
property step : 10
if application "QuickTime Player" is running then
tell application "QuickTime Player"
set playerPosition to (current time of front document) - step
set movieDuration to duration of front document