Skip to content

Instantly share code, notes, and snippets.

View jnbek's full-sized avatar

John D Jones III jnbek

View GitHub Profile
@jnbek
jnbek / xvfb.service
Created August 27, 2017 17:32 — forked from mylk/xvfb.service
Xvfb systemd script
# /etc/systemd/system/xvfb.service
[Unit]
Description=X virtual framebuffer
[Service]
Type=simple
User=root
ExecStart=/usr/bin/Xvfb :99 -ac
@jnbek
jnbek / dbus.sh
Created June 1, 2017 14:35 — forked from biboudis/dbus.sh
Playing with dbus.
# qdbus lists all service names of services that are running and you can manipulate at the moment.
qdbus
# control dbus
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
# and use --literal if you need to print the reply in plain text
qdbus --literal org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Playlists.ActivatePlaylist /org/mpris/MediaPlayer2/Playlists/20
dns/libidn
audio/liba52
net/avahi-app
textproc/intltool
textproc/p5-XML-Parser
devel/libdaemon
devel/dbus-glib
devel/dbus
textproc/minixmlto
textproc/docbook-xsl
:sout=#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=shout,mux=ogg,dst=source:E_G9KFo9ii9cFW_C-Ezqj_Zyh@192.168.0.129:8000//stream},dst=display} :sout-keep
@jnbek
jnbek / vlc_spew.txt
Created May 18, 2017 01:35
vlc spew
[00007f9590c1c358] core decoder error: Could not convert timestamp 634206836815
[00007f9590c1c358] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
[00007f9590c1c358] core decoder error: Could not convert timestamp 634206862937
[00007f9590c1c358] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
[00007f9590c1c358] core decoder error: Could not convert timestamp 634206889060
[00007f9590c1c358] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
[00007f9590c1c358] core decoder error: Could not convert timestamp 634206915182
[00007f9590c1c358] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
[00007f9590c1c358] core decoder error: Could not convert timestamp 634206941305
[00007f9590c1c358] clock decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 3000000)
@jnbek
jnbek / docker_cmd.tst
Last active April 5, 2017 23:57
My note for creating a working docker
[root@jude3 ~]# cat text_files/create_a_working_docker_containter_that_gets_Talked_to.txt
docker create -p 3000:3000 -t -i --name TestDeb debian bash
@jnbek
jnbek / bc_script.bc
Created April 4, 2017 18:08
bc script
#!/usr/bin/bc -l
scale = 20
/* Uses the fact that e^x = (e^(x/2))^2
When x is small enough, we use the series:
e^x = 1 + x + x^2/2! + x^3/3! + ...
*/
define e(x) {
auto a, d, e, f, i, m, v, z
" set the mapleader key
let mapleader = ","
let g:mapleader = ","
" use a better color scheme
colorscheme zellner
" set the default encoding
set enc=utf-8
@jnbek
jnbek / mem.c
Created January 27, 2017 19:07
Show Install Memory
#include <sys/sysinfo.h>
#include <stdio.h>
int main() {
int days, hours, mins;
struct sysinfo sys_info;
if(sysinfo(&sys_info) != 0)
perror("sysinfo");
// Total and free ram.
@jnbek
jnbek / cgit_gitweb
Created January 25, 2017 22:05
gitweb vs cgit
*************************** GITWEB *************************************
If you installed the GITWEB option please follow these instructions:
In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.
All you have to do to make gitweb work is:
1) Copy the files /usr/local/share/examples/git/gitweb/* to a directory on
your web server (e.g. Apache2) in which you are able to execute
CGI-scripts.