Skip to content

Instantly share code, notes, and snippets.

View bausmeier's full-sized avatar

Brett Ausmeier bausmeier

View GitHub Profile
@GeeLeonidas
GeeLeonidas / disable-agc-pipewire.sh
Last active February 6, 2024 08:19
Globally disables Auto Gain Control on PipeWire-based systems
#!/bin/bash
# Backups the previous configuration (optional if you take system snapshots regularly)
BACKUP_PATH="/usr/share/alsa-card-profile/mixer/paths_backup"
[ ! -d $BACKUP_PATH ] && sudo cp -vR /usr/share/alsa-card-profile/mixer/paths $BACKUP_PATH
# The actual Perl script that disables AGC
sudo perl -pi -0 -e 's/(\[[A-Za-z ]*Mic Boost\][A-Za-z._=\s-]+volume *= *)merge/\1zero/g;' /usr/share/alsa-card-profile/mixer/paths/*
# Shows the changes made to the system (optional)
@maanuanubhav999
maanuanubhav999 / GSoC-2021-Google-FHIR-SDK-Anubhav-Sharma.md
Last active September 21, 2021 15:02
Work Product - Google Summer of Code 2021 - Google FHIR SDK - Anubhav Sharma
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@jeffijoe
jeffijoe / app.js
Last active September 1, 2023 07:34
Streaming uploads through Koa.
import Koa from 'koa'
import parse from './busboy'
import AWS from 'aws-sdk'
const app = new Koa()
const s3 = new AWS.S3({
params: { Bucket: 'myBucket' }
})
@heppu
heppu / ARCH_INSTALL.MD
Last active February 27, 2022 17:01
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
var Fluxxor = require('fluxxor');
var request = require('superagent');
var AuthStore = Fluxxor.createStore({
actions: {
"LOGIN_AUTH": "onLoginAuth",
},
initialize: function() {
this.currentUser = {};
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@g-k
g-k / gpg-git-smudge-clean.md
Last active June 22, 2022 07:16
test transparent git encryption with smudge clean filters using gpg

Generate a GPG Key and revocation cert per http://www.gnupg.org/gpg/en/manual.html:

gpg --key-gen
gpg --output revoke.asc --gen-revoke <my user ID or email>

Once gpg key in keyring we can encrypt and decrypt files.