Skip to content

Instantly share code, notes, and snippets.

@dphov
dphov / ioslocaleidentifiers.csv
Last active May 9, 2018 09:01 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
Locale Identifier Locale Name
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
@dphov
dphov / Natural® Ergonomic Keyboard 4000 @ 0x14100000, Any Application (special keys).overdriveSettings
Last active September 10, 2021 13:23
USB Overdrive config for Microsoft Natural Ergonomic Keyboard 4000
<?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>active</key>
<true/>
<key>addr</key>
<integer>0</integer>
<key>altid</key>
<integer>0</integer>

Keybase proof

I hereby claim:

  • I am dphov on github.
  • I am dphov (https://keybase.io/dphov) on keybase.
  • I have a public key ASCCGxkr5452EpM8x10PFqeiE-9bZyLRc7bDSFdUEjhonAo

To claim this, I am signing this object:

@dphov
dphov / countdown.sh
Created December 24, 2017 15:26
POSIX shell compatible countdown timer. Credits to @cfajohnson
countdown()
(
IFS=:
set -- $*
secs=$(( ${1#0} * 3600 + ${2#0} * 60 + ${3#0} ))
while [ $secs -gt 0 ]
do
sleep 1 &
printf "\r%02d:%02d:%02d" $((secs/3600)) $(( (secs/60)%60)) $((secs%60))
secs=$(( $secs - 1 ))
@dphov
dphov / is_installed.sh
Created November 30, 2017 06:38 — forked from JamieMason/is_installed.sh
Check if a program exists from a bash script.Thanks to twitter.com/joshnesbitt and twitter.com/mheap for the help with detecting npm packages.
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Basic tutorial 12: Streaming
https://gstreamer.freedesktop.org/documentation/tutorials/basic/streaming.html
"""
import gi
import sys
import logging
#!/usr/bin/env python3
"""
Basic tutorial 9: Media information gathering
https://gstreamer.freedesktop.org/documentation/tutorials/basic/media-information-gathering.html
"""
import sys
import logging
import gi
gi.require_versions({'Gtk': '3.0', 'Gst': '1.0', 'GstApp': '1.0', 'GstPbutils': '1.0'})
@dphov
dphov / 08-short-cutting-the-pipeline.py
Last active November 23, 2017 11:55
half working example of Basic tutorial 8: Short-cutting the pipeline. Any help will be very welcome! Special thanks to: https://github.com/rubenrua/GstreamerCodeSnippets/blob/master/Other/0.10/Python/pygst-sdk-tutorials/basic-tutorial-8.py Tags: GStreamer Python Mac OS X
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Basic tutorial 8: Short-cutting the pipeline
https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html
"""
import sys
import logging
import gi
@dphov
dphov / 03-dynamic-pipelines.py
Last active November 10, 2017 11:53
GStreamer Dynamic Hello World mac os x python
#!/usr/bin/env python3
# coding=utf-8
# https://gstreamer.freedesktop.org/documentation/tutorials/basic/dynamic-pipelines.html
import gi
gi.require_versions({'Gtk': '3.0', 'Gst': '1.0'})
from gi.repository import Gst, Gtk
Gst.init(None)
@dphov
dphov / 02-gstreamer-concepts.py
Last active November 10, 2017 08:56
GStreamer mac os x python
# coding=utf-8
# https://gstreamer.freedesktop.org/documentation/tutorials/basic/concepts.html
# thanks to https://github.com/gkralik/python-gst-tutorial
import gi
# import sys
gi.require_versions({'Gtk': '3.0', 'Gst': '1.0'})
from gi.repository import Gst, GObject, GLib, Gtk
Gst.init(None)