Skip to content

Instantly share code, notes, and snippets.

View psqli's full-sized avatar

Ricardo Biehl Pasquali psqli

  • Campo Bom, Brazil
  • 19:41 (UTC -03:00)
  • X @psqli
View GitHub Profile
@amol9
amol9 / vlc_dbus.sh
Last active September 1, 2022 11:25
A bash script using gdbus to call vlc dbus interface methods and get / set properties.
#!/bin/bash
# bash script using gdbus to call vlc dbus interface methods and get / set properties
iface='org.mpris.MediaPlayer2'
dest="$iface.vlc"
obj='/org/mpris/MediaPlayer2'
i_prop='org.freedesktop.DBus.Properties'
@maxtruxa
maxtruxa / Antonyms.md
Last active June 18, 2024 18:39
A list of common terms used in programming and their respective antonyms.

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny
@diabloneo
diabloneo / timespec_diff.c
Created March 18, 2014 13:22
Calculate diff of two struct timespec
#include <time.h>
void timespec_diff(struct timespec *start, struct timespec *stop,
struct timespec *result)
{
if ((stop->tv_nsec - start->tv_nsec) < 0) {
result->tv_sec = stop->tv_sec - start->tv_sec - 1;
result->tv_nsec = stop->tv_nsec - start->tv_nsec + 1000000000;
} else {
result->tv_sec = stop->tv_sec - start->tv_sec;