Skip to content

Instantly share code, notes, and snippets.

@pksunkara
pksunkara / config.toml
Last active August 6, 2025 09:44
Sample of jj config file (Example jj/config.toml) (Place them in $XDG_CONFIG_HOME/jj)
'$schema' = 'https://jj-vcs.github.io/jj/latest/config-schema.json'
[user]
name = 'Pavan Kumar Sunkara'
email = '[email protected]'
username = 'pksunkara'
[ui]
default-command = 'default'
editor = 'nvim'
[
"Adaptive Tab Bar Colour",
"Add-ons Search Detection",
"BetterTTV",
"Bitwarden Password Manager",
"ClearURLs",
"Disable JavaScript",
"Facebook Container",
"Firefox Multi-Account Containers",
"Form Autofill",
@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
@crispyricepc
crispyricepc / install-instructions.md
Last active August 10, 2025 22:14
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@richkuz
richkuz / github-projectv2-projectnext-notes.md
Created August 7, 2022 13:56
Notes about using the new GitHub ProjectV2 API

Notes on GitHub ProjectV2 API

GitHub Projects Beta aka GitHub Projects Next aka GitHub ProjectNext is now known as GitHub ProjectV2 in the API.

It's not immediately obvious how to use the new API, especially if you're coming from the old beta API.

You no longer need to set the HTTP header: GraphQL-Features: projects_next_graphql.

You still need to add your GitHub personal access token to the Authorization header, e.g. Authorization: Basic ghp_...

@mrgrain
mrgrain / pinentry-1password.sh
Last active July 1, 2025 07:15
1Password CLI pinentry for gpg-agent
#!/bin/sh
COMMAND="op read $OP_PIN_ITEM"
echo "OK"
while read cmd rest; do
echo "cmd=$cmd rest=$rest" >&2
echo "cmd=$cmd rest=$rest" >> $LOG
case "$cmd" in
\#*)
@the-spyke
the-spyke / pipewire.md
Last active August 25, 2025 12:49
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@jc00ke
jc00ke / help.sh
Last active July 27, 2025 17:19
#!/usr/bin/env bash
# from https://gist.github.com/kovetskiy/a4bb510595b3a6b17bfd1bd9ac8bb4a5#gistcomment-3367404
set -euxo pipefail
trap 'echo "Exit status $? at line $LINENO from: $BASH_COMMAND"' ERR
# from https://utcc.utoronto.ca/~cks/space/blog/programming/BashGoodSetEReports
Help=$(cat <<-"HELP"
<!DOCTYPE html>
<html lang="en" class="dark">
<head><!-- head stuff --></head>
<body class="h-screen bg-gray-100 dark:bg-gray-900 text-gray-800 dark:text-grey-200 font-sans transition transition-colors ease-out">
<main role="main" class="container mx-auto">
<div x-data="{text: ['Light', 'Dark']}">
<button
class="border p-2 font-bold bg-gray-900 dark:bg-white text-white dark:text-grey-900"
@click="document.documentElement.classList.toggle('dark'); text = text.reverse()"
x-text="text[0]"
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.