Skip to content

Instantly share code, notes, and snippets.


Radu Potop radupotop

View GitHub Profile
View example-dbus.conf
tvheadend dbus-1/ root~# cat /usr/local/etc/dbus-1/system.d/avahi-dbus.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
<!-- Only root or user avahi can own the Avahi service -->
<policy user="avahi">
<allow own="org.freedesktop.Avahi"/>
View rc.conf
# /etc/rc.conf - Main Configuration for Arch Linux
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
# LOCALE: available languages can be listed with the 'locale -a' command
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
View rclone.conf
type = crypt
remote = SomeLocalRemote:/home/user
type = local
View mpd-pulse.service
Description=PulseAudio for MPD
ExecStart=/usr/bin/pulseaudio --daemonize=no
radupotop / gist:5c2664209c14dbb55c777b20ade7794d
Last active Nov 17, 2019
MIUI 10 safe to remove packages
View gist:5c2664209c14dbb55c777b20ade7794d
# In the adb shell
pm list packages
pm uninstall -k --user 0 <package> # only remove the UI package!
radupotop /
Last active Nov 10, 2019
Transcoding with FFMPEG
# Transcode
ffmpeg -i inputfile \
-map 0 \ # choose the track by index
-c:v copy \ # codec:video - copy as is
-c:s copy \ # codec:subtitles - copy as is
-c:a ac3 -b:a 640k \ # codec:audio - transcode to AC3, maximum bitrate
# Just get info about the codecs used and available tracks
ffmpeg -i inputfile
radupotop / mpd.conf
Created Oct 23, 2019
Example MPD audio stream
View mpd.conf
audio_output {
type "httpd"
name "HTTP Stream"
encoder "flac" # null vorbis lame wave flac
port "8000"
bind_to_address "" # optional, IPv4 or IPv6
#quality "0" # do not define if bitrate is defined
always_on "yes"
tags "yes"
format "44100:16:2"
radupotop /
Created Aug 23, 2019 — forked from Dammmien/
wget cheat sheet
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off
# But it may be sufficient
wget -mpk
# Download all images of a website
View vsftpd.conf
# Example config file /etc/vsftpd.conf
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
View gist:898d6504272a927496fc94d91916c34e
> http --head "http://localhost:8000/reports/screening_report?"
HTTP/1.0 500 Internal Server Error
Content-Length: 139657
Content-Type: text/html
Date: Mon, 20 May 2019 10:35:03 GMT
Server: WSGIServer/0.2 CPython/3.6.7
> http --head "http://localhost:8000/reports/screening_report/?"
HTTP/1.0 500 Internal Server Error
Content-Length: 139672
You can’t perform that action at this time.