Skip to content

Instantly share code, notes, and snippets.

#define _POSIX_C_SOURCE 200112L
#include <errno.h>
#include <assert.h>
#include <stdio.h>
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
#include <sys/mman.h>
diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c
index 00d334ee..1b8b7654 100644
--- a/plugins/gtkui/fileman.c
+++ b/plugins/gtkui/fileman.c
@@ -315,28 +315,24 @@ set_file_filter (GtkFileChooser *dlg, const char *name) {
if (!name) {
name = _("Supported sound formats");
}
- static char extlist[10000];
{
"app-id": "com.hostfission.looking-glass",
"branch": "stable",
"runtime": "org.freedesktop.Platform",
"runtime-version": "18.08",
"sdk": "org.freedesktop.Sdk",
"command": "looking-glass-client",
"finish-args": [
"--share=ipc",
"--device=dri",
@saivert
saivert / launch.json
Created May 26, 2019 10:08
Trying to get vscode to launch flatpak with gdbserver for remote debugging of flatpaks inside vscode.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"app-id": "",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
@saivert
saivert / deadbeef.json
Created May 18, 2019 13:36
deadbeef flatpak manifest
{
"app-id": "music.deadbeef.player",
"runtime": "org.gnome.Platform",
"runtime-version": "3.32",
"sdk": "org.gnome.Sdk",
"command": "/app/deadbeef",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
@saivert
saivert / plugin.d
Created May 14, 2018 20:49
deadbeef plugin written in D broken sample
/*
Example misc plugin for the DeaDBeeF audio player
written using the D programming language
Copyright (C) 2017 Nicolai Syvertsen <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
<network trustGuestRxFilters='yes'>
<name>direct-macvtap</name>
<uuid>c3e12a99-3047-4486-9861-fa22b6c32e54</uuid>
<forward dev='enp8s0' mode='bridge'>
<interface dev='enp8s0' />
</forward>
</network>
@saivert
saivert / client.ovpn
Created December 7, 2016 22:46
Connect to OpenVPN server from inside LAN
client
dev tun
proto udp
.
.
.
# !! Need to use LAN address when connecting from inside the LAN using UDP
remote 192.168.1.1 1194
# !! Also need to fix route
@saivert
saivert / rdp-ssh.cmd
Last active November 24, 2016 20:55
RDP tunneled over SSH on bash on windows
REM Fire up bash on windows to run our ssh client with port forwarding and a master control socket
REM using /b to background the task
start /b bash.exe -c "ssh -N -L127.0.0.1:3390:10.0.0.8:3389 -M -S ~/.rdp-ssh.socket [email protected]"
REM start RDP client and wait for it to close
start /wait mstsc.exe /v:127.0.0.1:3390
REM send stop signal to our ssh client
bash.exe -c "ssh -O stop -S ~/.rdp-ssh.socket [email protected]"
[Match]
Name=enp7s0
[Network]
Address=192.168.1.60/24
Gateway=192.168.1.1
DNS=192.168.1.1
Address=2a01:79d:7377:900c::2/64
Gateway=fe80::e23f:49ff:fe99:7000