Skip to content

Instantly share code, notes, and snippets.

View ajboni's full-sized avatar

Alexis Boni ajboni

View GitHub Profile
@ajboni
ajboni / pw-meta.sh
Last active April 14, 2024 23:12
Simple Yad Frontend to set Pipewire metadata and other pro audio shortcuts
#!/bin/bash
# Simple Yad Frontend to set Pipewire metadata
# Adapted from this post: https://discourse.ardour.org/t/simple-pipewire-pw-metadata-ui/109207/2
# sudo cat /etc/sudoers.d/cpupower 20:03:16
# user ALL=(ALL) NOPASSWD: /usr/bin/cpupower
quantum=$(pw-metadata -n settings 0 clock.force-quantum | sed -n "s/.*value:'\([^']*\)'.*/\1/p")
rate=$(pw-metadata -n settings 0 clock.force-rate | sed -n "s/.*value:'\([^']*\)'.*/\1/p")
governor=$(cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | head -1)
governors=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors | sed 's/ /!/g')
@ajboni
ajboni / history
Created May 30, 2020 18:01
Instalar Docker En Proxmox
461 neofetch
462 sudo apt update
463 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
464 curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
465 sudo apt-key fingerprint 0EBFCD88
466 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian \
467 $(lsb_release -cs) \
468 stable"
469 sudo apt-get update
470 sudo apt-get install docker-ce docker-ce-cli containerd.io
@ajboni
ajboni / functions.php
Created May 3, 2020 20:23
Wordpress / Woocommerce - Hide Shipping Fields and address selector for Local Pickup in Cart Page
/**
* @snippet Hide Shipping Fields and address selector for Local Pickup in Cart Page
* @author Alexis Boni
* @testedwith WooCommerce 5.4 - OceanWP theme.
*/
do_action('woocommerce_after_shipping_rate', $method, $index);
// define the woocommerce_after_shipping_rate callback
function action_woocommerce_after_shipping_rate($method, $index)
{
@ajboni
ajboni / keyboardShortcut.txt
Created September 24, 2018 07:03
# Get a screenshot area, save it to clipboard AND Save it to file
maim -s | xclip -selection clipboard -t image/png && xclip -selection clipboard -o > ~/screenshots/$(date +%s).png
@ajboni
ajboni / SceneLauncher.cs
Created November 14, 2017 02:39
Unity MultiScene Launcher
using UnityEngine;
using UnityEngine.SceneManagement;
namespace UAE
{
public class SceneLauncher : MonoBehaviour
{
// Use this for initialization
void Awake()