Skip to content

Instantly share code, notes, and snippets.

@triadmoko
triadmoko / oauth2_integration.go
Created July 16, 2022 14:23 — forked from tuxlinuxien/oauth2_integration.go
gin gonic oauth2 integration
package main
import (
"bytes"
"encoding/json"
"github.com/gin-gonic/gin"
"golang.org/x/oauth2"
"golang.org/x/oauth2/bitbucket"
"golang.org/x/oauth2/github"
"golang.org/x/oauth2/google"
@cfra
cfra / pulseaudio-u44.md
Last active July 31, 2023 14:57
Zoom U-44 PulseAudio Setup

Zoom U-44 PulseAudio Setup

Problem Statement

The Zoom U-44 works out of the box with recent Linux versions.

By default, PulseAudio will register it as a single sink with 4 output channels. As the U-44 is organized to have two stereo pairs for outputs, there are situations where it is more useful to have 2 separate sinks available, each playing back to one of the two stereo pairs.

@nmarley
nmarley / README.md
Last active June 7, 2024 19:45
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
###############################################
# TX SX OS unpacker - by hexkyz and naehrwert #
###############################################
from Crypto.Cipher import AES
from Crypto.Util import Counter
import os
import struct
"""

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.

@tuxlinuxien
tuxlinuxien / oauth2_integration.go
Last active October 18, 2023 10:50
gin gonic oauth2 integration
package main
import (
"bytes"
"encoding/json"
"github.com/gin-gonic/gin"
"golang.org/x/oauth2"
"golang.org/x/oauth2/bitbucket"
"golang.org/x/oauth2/github"
"golang.org/x/oauth2/google"
@samiraguiar
samiraguiar / MC Cheat Sheet
Last active June 19, 2024 17:31 — 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
@borlaym
borlaym / animals.json
Created December 15, 2014 13:38
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",