Skip to content

Instantly share code, notes, and snippets.

View mraxilus's full-sized avatar
🔸

Emmanuel M. Smith🔸 mraxilus

🔸
View GitHub Profile
@r15ch13
r15ch13 / iommu.sh
Last active September 27, 2024 15:44
List IOMMU Groups and the connected USB Devices
#!/usr/bin/env bash
shopt -s nullglob
lastgroup=""
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
for d in $g/devices/*; do
if [ "${g##*/}" != "$lastgroup" ]; then
echo -en "Group ${g##*/}:\t"
else
echo -en "\t\t"
#########################
# Machine Configuration #
#########################
{ config, inputs, lib, pkgs, unstable, ... }:
{
imports = [
./primary-user-nixos.nix
./desktop-apps.nix
./desktop-kde.nix
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@araa47
araa47 / PyNixDirEnvReadme.md
Last active February 8, 2024 10:51
Python3 Dev Environment with Pipenv using Nix and direnv for Linux and macOS

System Set-Up

  1. Install nix on your system curl https://nixos.org/nix/install | sh
  2. . ~/.nix-profile/etc/profile.d/nix.sh
  3. Install direnv nix-env -i direnv
  4. Add hook into shell by running eval "$(direnv hook bash)" , you will need to add this to .bash_profile to make it presistant

Project Set-Up

Create a shell.nix file in your project with the following content. This has python 3.7 and pipenv as buildInputs

@lifepillar
lifepillar / 24-bit-color.sh
Created November 20, 2017 11:48
Test 24 bit colors in terminals
#!/bin/bash
#
# This file echoes a bunch of 24-bit color codes
# to the terminal to demonstrate its functionality.
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
# <r> <g> <b> range from 0 to 255 inclusive.
# The escape sequence ^[0m returns output to default
setBackgroundColor()
@turbo
turbo / std.md
Last active September 6, 2024 19:46
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
@lynn
lynn / lojban-thesaurus.md
Last active August 26, 2024 19:30
A semantically sorted list of Lojban root words

Lojban Thesaurus

Translated to Markdown from this ancient TeX file. I’m not sure who made the original.

Hover over a link to see the place structure. Click it to view gismu info on Wiktionary.

1 Structures

1.1 Set, group, mass

@teknikqa
teknikqa / lastfm_delete_loved.js
Created May 7, 2017 06:38
Bulk delete Last.FM scrobbles & loved tracks
// On the Last.FM website go to the page which lists the tracks that you have loved.
// Open Chrome DevTools (or Firefox or any modern browser that has a built in Javacript Console)
// and run the following command.
// This basically clicks on all the delete buttons on the page and reloads the page.
jQuery('.love-button--loved').each(function(_, b) {
b.click();
});
location.reload();
@stared
stared / live_loss_plot_keras.ipynb
Last active February 25, 2023 10:20
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zacharycarter
zacharycarter / wclwn.md
Last active August 19, 2024 03:44
Binding to C Libraries with Nim