Skip to content

Instantly share code, notes, and snippets.

View bk138's full-sized avatar
🐿️
creating

Christian Beier bk138

🐿️
creating
View GitHub Profile
@Farhan-Haseeb
Farhan-Haseeb / README
Created June 17, 2020 16:51
How to reopen a closed PR on Github
How to reopen a pull-request from github?
Precodinitions
You need the rights to reopen pull requests on the repository.
The pull request hasn't been merged, just closed.
Go to Pull requests add filter `is:closed` choose PR you want to reopen. Select from checkbox and mark as Open.
@pulsar256
pulsar256 / opus-p2p-streaming.md
Last active January 29, 2024 01:19
Opus p2p Audio Streaming

Opus p2p streaming

Low latency streaming of ogg compressed audio data between two peers using RTP and gstreamer-1.0. Expected latency over the network is below 1 second.

Producer

The producer will provide a Jack sink which needs to be connected to a audio producer.

TARGET_PORT=5100
@MightyPork
MightyPork / utf8_encode.c
Last active February 28, 2024 08:07
C function to encode a Unicode code point as UTF-8 byte array
#include <stdint.h>
/**
* Encode a code point using UTF-8
*
* @author Ondřej Hruška <ondra@ondrovo.com>
* @license MIT
*
* @param out - output buffer (min 5 characters), will be 0-terminated
* @param utf - code point 0-0x10FFFF
@baines
baines / xkeyexample.c
Last active September 19, 2023 20:53
simple xlib key example
#include <stdio.h>
#include <locale.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
int main(void){
setlocale(LC_ALL, "");
Display* dpy = XOpenDisplay(NULL);
@samiraguiar
samiraguiar / MC Cheat Sheet
Last active April 13, 2024 10:22 — forked from maciakl/MC Cheat Sheet
Midnight Commander Cheat Sheet / Shortcuts
Note for newcomers:
In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention
used in the Midnight Commander documentation and was kept here.
You can also use "ESC" instead of "ALT", which is useful on Macbooks.
Main View
---------------------------------------------------------------
- File/directory operations
@jokecamp
jokecamp / package.json
Last active July 6, 2020 13:50
Demo for Passport.js authentication in a Node.js Express application
{
"name": "securehelloworld",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@steipete
steipete / PSPDFEnvironment.m
Last active March 5, 2024 09:15
Example for DISPATCH_SOURCE_TYPE_MEMORYPRESSURE (Mac only, since 10.9) ... Since we share code between iOS and mac, I'm trying to be a good system citizen and reimplement the equivalent of UIApplicationDidReceiveMemoryWarningNotification on the Mac.
NSString *const PSPDFApplicationDidReceiveMemoryWarningNotification = @"PSPDFApplicationDidReceiveMemoryWarningNotification";
// Test with sudo memory_pressure -l critical. Don't forget to re-set afterwards!
__attribute__((constructor)) static void PSPDFInstallLowMemoryNotificationWarningMac(void) {
static dispatch_source_t source;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYPRESSURE, 0, DISPATCH_MEMORYPRESSURE_WARN|DISPATCH_MEMORYPRESSURE_CRITICAL, dispatch_get_main_queue());
dispatch_source_set_event_handler(source, ^{
dispatch_source_memorypressure_flags_t pressureLevel = dispatch_source_get_data(source);
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation