Skip to content

Instantly share code, notes, and snippets.

View ramnes's full-sized avatar

Guillaume Gelin ramnes

View GitHub Profile
@ethan-leba
ethan-leba / readme.org
Last active March 13, 2024 13:34
Yabai + Emacs seamless window movement

Yabai + Emacs window movement integration

This is a short guide to setting up unified window movement bindings with Yabai + SKHD and Emacs, inspired by this tmux-vim movement guide. Short video demo here.

For example, if there’s if Emacs is in focus and there’s an Emacs window to the left, then that window will be focused with the binding. Otherwise, the next application to the left will be focused. In this guide I’m using alt - HJKL, but you can substitute those with whatever you’d like.

#! /bin/sh
nix-instantiate --find-file nixpkgs >/dev/null || {
echo "Could not find nixpkgs, please set up your NIX_PATH"
exit 1
}
NIX_DO_STASH="${NIX_DO_STASH:-$HOME/.local/share/nix-do}"
NIX_DO_PROFILE="${NIX_DO_PROFILE:-$(readlink $HOME/.nix-profile)}"
@tazjin
tazjin / thoughts.md
Last active February 28, 2024 12:05
Nix builder for Kubernetes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tadly
tadly / rofi-emoji.sh
Last active April 14, 2024 01:12
Rofi emoji picker
#!/usr/bin/env bash
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
# 1. Download all emoji
@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active April 22, 2024 14:33
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
@NelsonMinar
NelsonMinar / python-json-types.py
Created January 10, 2016 23:07
Testing various dict wrappers for Python JSON
"""
Various options for a JSON type for Python.
My best effort at using these libraries naturally for reading and writing JSON.
https://nelsonslog.wordpress.com/2016/01/08/a-better-python-object-for-json/
"""
import json, copy
import dotmap, attrdict, easydict, addict
@bersace
bersace / py.sh
Last active December 30, 2015 15:27
Script python exécutable et sourceable par bash
#!/bin/bash
## -*- python -*-
#
# This python script is callable and sourceable by bash.
#
# lint python with: flake8 --ignore=E225,E265 py.sh
# lint bash with: sed '/^## END BASH/,$d' py.sh | shellcheck -
## In bash, declare a variable script, assign value "#". In python, declare a
## variable scriptd, assign a heredoc containing the bash script.
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 18:53
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites