Skip to content

Instantly share code, notes, and snippets.

aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp
@takaswie
takaswie / pcm-rw-interleaved.c
Last active December 3, 2023 15:49
ALSA PCM application to utilize intermediate buffer inner kernel space
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@robsondepaula
robsondepaula / gist:92acead3594a1c233acc73e03146a9f0
Last active February 28, 2024 17:24
In case Ubuntu 18.04 audio does not work on iMac 27.
* Edit Alsa configuration:
sudo nano /etc/modprobe.d/alsa-base.conf
* Add to the end of the file:
options snd-hda-intel model=imac27_122
* Reload Alsa module:
pulseaudio -k
sudo alsa force-reload
@JayKickliter
JayKickliter / emacs-gfm.md
Last active November 13, 2022 18:38
Render github-flavored markdown (GFM) in emacs using `pandoc`

Command line usage

pandoc pandoc --quiet -f gfm -s somefile.md

What the options mean:

  1. --quiet: supress "[WARNING] This document format requires a nonempty <title> element."
  2. -f gfm: input format is Github Flavored Markdown
@a-raccoon
a-raccoon / radio.m3u
Last active August 1, 2023 04:12
My hodgepodge of News & Talk Radio feed live streams.
#EXTM3U
# filename: radio.m3u
# -------------------
# My Talk/News Live Streaming Radio Playlist
# Get this playlist on your phone! I use VLC
##### https://git.io/vKiO1 ######
# #
# #
# █▀▀▀▀▀█ █▄█ █▄█ ▄ █▀▀▀▀▀█ #
@5310
5310 / .XCompose
Last active October 3, 2022 18:38
[Defunct] My sequences for use with the Compose key. Based off of kragen/xcompose and then overridden. Now part of Bash-It dotfiles repo. #dotfile
# ~/.XCompose
### Based on the en_US.UTF locale. ###
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
### Populated with Kragen's additions. ###
@bmaupin
bmaupin / build-reicast.sh
Last active June 21, 2020 16:33
Build Reicast emulator on Ubuntu/Debian
# NOTE: These instructions are old and may be out of date. A better alternative to compiling Reicast manually may be to use RetroArch with the Flycast core (https://www.retroarch.com/)
# Install prerequisites
sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev
# Build Reicast
git clone https://github.com/reicast/reicast-emulator.git
cd reicast-emulator/shell/linux
make
# Run Reicast
@benkulbertis
benkulbertis / cloudflare-update-record.sh
Last active March 4, 2024 11:27
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 2a75365..b466ab2 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -81,6 +81,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <locale.h>
+#include <math.h>
@seankross
seankross / init.md
Created February 5, 2014 18:26
Initializing GitHub repository

Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/seankross/womp.git
git push -u origin master