Skip to content

Instantly share code, notes, and snippets.

View eggbean's full-sized avatar

Jason Gomez eggbean

  • London, United Kingdom
View GitHub Profile
@aileftech
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
# -*- coding: utf-8 -*-
# pylint: disable=consider-using-f-string,invalid-name,line-too-long,super-with-arguments
'''
Ranger color-scheme using `$LS_COLORS` / `dircolors`.
Originally based on: https://github.com/ranger/colorschemes/raw/a250fe866200940eb06d877a274333a2a54c34f3/ls_colors.py
Usage: copy this file to `~/.config/ranger/colorschemes'. The base color-scheme
used for non file system entries / the unfocused pane is `default`. To change it,
@SwooshyCueb
SwooshyCueb / almalinux
Last active February 9, 2024 13:13
Various os-release files
NAME="AlmaLinux"
VERSION="8.4 (Electric Cheetah)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA"
HOME_URL="https://almalinux.org/"
@matusnovak
matusnovak / README.md
Last active March 31, 2024 21:27
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed

@brndnmtthws
brndnmtthws / route53-to-tf.py
Last active March 2, 2023 18:43
A python script for converting existing AWS Route53 records into Terraform HCL
#!/usr/bin/env python3
#
# Copyright (c) 2020 Brenden Matthews <brenden@brndn.io> under the MIT license
# at https://opensource.org/licenses/MIT
#
# This script converts existing Route53 records into Terraform HCL. I created
# this for a one-off job. The script uses the AWS CLI to fetch Route53 info,
# and prints the corresponding TF code to stdout.
#
# Example usage:
@bmatthewshea
bmatthewshea / geoip2lookup.bash
Last active December 4, 2023 20:59
GeoIP Lookup scripts for use with new Maxmind MMDB database files
#!/bin/bash
#
# By: Brady Shea - 10FEB2020 - Last update 04DEC2023
#
# Usage (ip4 only):
# geoip2lookup IP_ADDRESS
#
# ** Install GeoIP Tool and Updater **
#
# sudo add-apt-repository ppa:maxmind/ppa
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 25, 2024 01:56
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@eodabas
eodabas / s3vim.sh
Created July 12, 2019 14:05
wrapper for editing files on s3 with vim
#!/bin/bash
print_help() {
echo -e "Usage:\n\n $0 [--profile PROFILE] [s3_url]\n"
exit 1
}
while [[ -n $1 ]];
do
if [[ $1 == "-p" ]] || [[ $1 == "--profile" ]]; then
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active April 16, 2024 22:19
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@TaipanRex
TaipanRex / Windows-app-Ranger.md
Last active November 16, 2023 10:05
How to launch Windows applications from Ranger in Windows Subsystem for Linux (WSL)

Make sure you have WSL with the Windows 10 Fall Creators Update installed. Ranger uses rifle as a file handler and you need its config file, rifle.conf. If you dont have it (should be in ~/.config/ranger/rifle.conf), run the command ranger --copy-config=rifle, then edit the resulting file.

To run Windows applications from Ranger, we will use cmd.exe /C start "" <file>, which works after the Fall Creators Update. The problem is that Ranger will feed in file paths using Unix pathing, but start expects Windows pathing. We will solve this by using sed to translate the path.

Add below code to your rifle.conf and you will be able to run Windows applications for the chosen file extensions.