Skip to content

Instantly share code, notes, and snippets.

@grwlf
grwlf / vkontakte_m3u8_downloader.sh
Last active October 21, 2023 20:04
vkontakte_m3u8_downloader.sh
#!/bin/sh
# VKontakte *m3u8 downloader
# Worked at the time of writing
mkdir /tmp/m3u8
set -e -x
cd /tmp/m3u8
rm *
@Brainiarc7
Brainiarc7 / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
Last active January 8, 2024 21:00
This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@initialed85
initialed85 / ubiquiti_air_os_scrape.py
Created February 1, 2018 14:18
Example interaction with Ubiquiti AirOS "API"
# Requirements:
#
# Python 2.7
# Requests package (pip install requests)
import pprint
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
USERNAME = 'some_readonly_username'
@AgentOak
AgentOak / youtube_formats.md
Last active May 9, 2024 17:31
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
@giu1io
giu1io / cleanNotifications.sh
Last active August 29, 2015 14:21
Shell script that removes all notifications from Notification Center on OSX
#!/bin/bash
# Thanks @LucaTNT for making the script work on < 10.10
MAJOR_OSX_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $2}')
if [[ $MAJOR_OSX_VERSION -ge 10 ]]
then
DB_PATH=`getconf DARWIN_USER_DIR`com.apple.notificationcenter/db/db
else
DB_PATH="$HOME/Library/Application Support/NotificationCenter/"
DB_PATH=$DB_PATH`ls "$DB_PATH"`
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@nocturnalgeek
nocturnalgeek / MailinatorAliases
Last active April 8, 2024 20:45
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@rnorth
rnorth / bc
Last active August 3, 2016 00:49
Boxcar push notification shell script
#!/bin/bash
# Sends a Boxcar push notification through the Boxcar HTTP API
# Usage examples
# $ bc # Just sends a notification with title 'bc'
# $ bc "Done" # Sends a notification with title 'Done'
# $ echo foobar | bc # Sends a notification with title 'bc' and message body 'foobar'
# $ echo foobar | bc "Done" # Sends a notification with title 'Done' and message body 'foobar'
#
# Expects a file ~/.boxcar to exist with content like
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.