Skip to content

Instantly share code, notes, and snippets.

Paul Galow paulgalow

Block or report user

Report or block paulgalow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Brainiarc7
Brainiarc7 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Last active Sep 17, 2019
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS
View ffmpeg-vp8&9-encode-test-vaapi-intel.md

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools

@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active Oct 10, 2019
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware
View ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@pudquick
pudquick / battery.py
Last active Dec 8, 2018
Accessing battery details via python and pyobjc on macOS / OS X
View battery.py
import objc
from Foundation import NSBundle
IOKit = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit')
functions = [("IOServiceGetMatchingService", b"II@"),
("IOServiceMatching", b"@*"),
("IORegistryEntryCreateCFProperties", b"IIo^@@I"),
("IOPSCopyPowerSourcesByType", b"@I"),
("IOPSCopyPowerSourcesInfo", b"@"),
@pudquick
pudquick / autotimezone.py
Last active Apr 21, 2017
Forcing automatic timezone discovery with pyobjc on OS X
View autotimezone.py
# Tested on 10.11
# Assumes your network is in a state to actually do the discovery and that you have
# automatic timezone discovery enabled in Date & Time and Location services enabled
# (Generally this means wifi enabled on your device and network stack is up)
# For enabling location services and auto, check Allister's work here:
# https://gist.github.com/arubdesu/b72585771a9f606ad800
from Foundation import NSBundle
TZPP = NSBundle.bundleWithPath_("/System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZone.prefPane")
@grahampugh
grahampugh / mail_profile.mobileconfig
Last active Nov 25, 2017
E-Mail IMAP configuration profile and outset script. Takes the long user name of the logged in user to populate the email field. User must supply only the password.
View mail_profile.mobileconfig
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadIdentifier</key>
<string>
com.apple.mdm.server1.local.%first_uuid%.alacarte</string>
<key>PayloadRemovalDisallowed</key>
<false />
@groob
groob / ca-tls-server.md
Last active Mar 11, 2017
quick CA server
View ca-tls-server.md

create a CA and generate keys

# pull container for https://github.com/rcrowley/certified
docker pull groob/certified:latest
# create CA and intermediary CA; will prompty you for a password
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified-ca C="US" ST="NY" L="New York" O="Example" CN="groob-ca"
# create server cert
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified CN="servq.groob.io"
# create cert chain as server.crt
cat certs/ssl/certs/servq.groob.io.crt certs/ssl/certs/ca.crt certs/ssl/certs/root-ca.crt > server.crt
@n8henrie
n8henrie / pyscript.py
Last active Oct 6, 2019 — forked from nhoffman/pyscript.py
Python script template
View pyscript.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""pyscript.py
A simple python script template.
http://ajminich.com/2013/08/01/10-things-i-wish-every-python-script-did/
"""
import argparse
View giantuser_signature.html
<body>
<br />
<br />
<br />
<style type='text/css'>
a{margin:0;padding:0;border:none !important;text-decoration:none !important;}
table,tr,td,a,span{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
</style>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<meta name='format-detection' content='telephone=no' />
@josephspurrier
josephspurrier / values_pointers.go
Last active Oct 8, 2019
Golang - Asterisk and Ampersand Cheatsheet
View values_pointers.go
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@juancarlospaco
juancarlospaco / logging_colors.py
Last active May 17, 2019
Add Colors to Logging Python3
View logging_colors.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import logging as log
from copy import copy
if not sys.platform.startswith("win") and sys.stderr.isatty():
You can’t perform that action at this time.