Skip to content

Instantly share code, notes, and snippets.

@mnarayan
mnarayan / awesome-beamer.md
Last active April 12, 2023 11:39
Modern Beamer Templates
@jethrokuan
jethrokuan / convert.sh
Created April 1, 2020 05:08
Roam Export to Org-roam
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -o "${0%.md}.org"' {} \;
rm *.md
find ./ -iname "*.org" -type f -exec sh -c 'sed -i -E "s/\[\[(.*)\]\]/\[\[file:\1.org]\[\1\]\]/" "${0}"' {} \;

Converting my bibliography file to roam format

[2020-02-18 Tue]

I use this function to create a note file from a bibtex entry (the point is on the bibtex entry).

;;** Open notes from bibtex entry
;;;###autoload
(defun aah/org-ref-open-bibtex-notes ()
  "From a bibtex entry, open the notes if they exist.
@Djuuu
Djuuu / .xbindkeysrc
Created December 28, 2019 21:33
Logitech MX Master 3 - horizontal scroll as buttons - sensitivity reduction on Linux (xbindkeys & external script)
## Scrollwheel left
"~/.xbindkeys/MX-Master-3-bindings.sh Scroll_L"
b:7 + release
## Scrollwheel right
"~/.xbindkeys/MX-Master-3-bindings.sh Scroll_R"
b:6 + release
@hamidzr
hamidzr / sof-audio-setup-carbonx1.sh
Last active June 18, 2025 14:48
Lenovo Carbon X1 Gen 7 - Audio and microphone fix - https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7) might be all you need.
#!/bin/bash
# README You probablyl don't need this script anymore. Please read the comments below to catch up.
## Description
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required.
# The script has only been tested for Arch and OpenSuse,
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823
# Prereq: Install Linux 5.3 or newer
@jeremyblow
jeremyblow / dreem_csv_to_oscar_zeo.py
Last active February 28, 2024 02:56
Convert Dreem CSV to OSCAR-friendly Zeo CSV
"""Convert Dreem CSV to OSCAR-friendly Zeo CSV
Liberty taken with the ZQ column, pinning it to 0. Other non-common fields are nulled.
Tested with Python 3.7.3 and 2.7.10.
Usage:
python dreem_csv_to_oscar_zeo.py data_in.csv data_out.csv
"""
from csv import DictReader, DictWriter
from datetime import datetime, timedelta
@abrochard
abrochard / presentation.org
Last active March 7, 2025 21:53
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
@chux0519
chux0519 / multi-level-sort.rs
Created February 5, 2019 13:21
multi level sort in rust
/// Multi-level sort a slice of Foobars according to [(field, reverse)]
fn sort_by_names(f: &mut [Foobar], orderings: &[(Foofields, bool)]) {
use std::cmp::Ordering;
f.sort_by(|a, b| {
let mut cmp = Ordering::Equal;
for (field, reverse) in orderings {
if cmp != Ordering::Equal {
break;
}
@mortymacs
mortymacs / increase-emacs-startup.md
Last active February 18, 2020 19:33
Increase emacs startup speed

Add this line in /etc/profile:

if [ ! `ps -x | grep emacs | grep daemon | awk '{ print $2 }'` ]; then
  emacs --daemon 2> /dev/null
fi

Relogin again to start the daemon.

Now you can edit your files with emacsclient command like so:

@bdarcus
bdarcus / setup.fish
Last active March 30, 2022 04:31
basic post-install setup script for fedora; run w/sudo
#!/usr/bin/env fish
# note: fish at first glance seems much more straightforward to setup with fisher than zsh with zinit
# In particular, fish works with XDG by default, while I wasted a lot of times on env variables
# to get it to work with zsh + zinnit correctly.
# fisher
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
# the theme options are many, but these two do async git update