Skip to content

Instantly share code, notes, and snippets.

View dragid10's full-sized avatar

Alex Oladele dragid10

View GitHub Profile
@jwhett
jwhett / alacritty.yml
Created August 26, 2022 12:47
Alacritty config - github.com/alacritty/alacritty
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@danish17
danish17 / gist:c5c5fb6eb99d452c339e393ed637640b
Last active April 13, 2024 09:22
LogiOps MX Master 3 Configuration
// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// What's working:
// 1. Window snapping using Gesture button (Thumb)
// 2. Forward Back Buttons
// 3. Top button (Ratchet-Free wheel)
// What's not working:
// 1. Thumb scroll (H-scroll)
// 2. Scroll button
@onlime
onlime / zfs-destroy-snapshots.py
Created August 6, 2021 11:27
Helper script to remove old ZFS snapshots
#!/usr/bin/env python3
"""
Helper script to remove old ZFS snapshots
Copyright (c) Onlime GmbH, https://www.onlime.ch
"""
import argparse
from re import compile
from datetime import datetime, timedelta
from subprocess import check_output
import sys
@plembo
plembo / addbr0ubunmcli.md
Last active April 22, 2024 15:51
Add br0 to Ubuntu desktop using nmcli

Add a bridge interface to Ubuntu desktop using nmcli

Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.

In the examples below "eth0" is the name of my physical interface. By default on Ubuntu and most distributions that will almost certainly be different, for example: "eno1", "ens1", or "enp2s0".

To see what everything looks like before starting:

@15696
15696 / cogs.py
Last active May 3, 2024 12:59
simple cogs example in discord.py
# main.py
from discord.ext import commands
import os
client = commands.Bot(command_prefix = "!")
for f in os.listdir("./cogs"):
if f.endswith(".py"):
client.load_extension("cogs." + f[:-3])
@greeflas
greeflas / install-toolbox.sh
Last active March 29, 2024 07:53
JetBrains Toolbox installation script for Ubuntu - https://www.jetbrains.com/toolbox/app/
#!/bin/bash
set -e
if [ -d ~/.local/share/JetBrains/Toolbox ]; then
echo "JetBrains Toolbox is already installed!"
exit 0
fi
echo "Start installation..."
@ssaurel
ssaurel / Board.java
Last active February 6, 2018 03:00
Board for a Tic-Tac-Toe game on SSaurel's Blog
package com.ssaurel.tictactoe;
import java.util.Random;
public class Board {
private static final Random RANDOM = new Random();
private char[] elts;
private char currentPlayer;
private boolean ended;
@BernCarney
BernCarney / FreeNAS11 Media Stack.md
Last active May 1, 2023 20:31
FreeNAS 11 - Jails setup for Plex, NGINX, PlexPy, Sonarr, Radarr, Jackett, Ombi, and Nzbget

FreeNAS 11 setup for Plex, PlexPy, Sonarr, Radarr, Jackett, NZBGet, Organizr, NGinx, and Ombi

I am currently working on updating this guide after updating my media server. I have added notes on things I no longer use but may update those sections in the future for users who still use them. As of now, I have everything working with the exception of Ombi and the plugins I no longer use.

@pgolding
pgolding / scan.py
Created June 5, 2017 19:40
scan all elements from a dynamodb table using Python (boto3)
from __future__ import print_function # Python 2/3 compatibility
import boto3
import json
import decimal
from boto3.dynamodb.conditions import Key, Attr
# Helper class to convert a DynamoDB item to JSON.
class DecimalEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, decimal.Decimal):