Skip to content

Instantly share code, notes, and snippets.

View ferr0's full-sized avatar

Alexander ferr0

View GitHub Profile
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@ferr0
ferr0 / terminal-setup.md
Created November 3, 2024 16:03 — forked from UnitedWithCode/terminal-setup.md
Setting up a decent looking Windows Terminal with Oh-my-Posh that works with WSL and integrate it in VSCode and IntelliJ

Setting up a decent looking Windows Terminal with Oh-my-Posh that works with WSL and integrate it in VSCode and IntelliJ

This is a briefly summary of what I did to set up my Windows Terminal for Powershell on the Windows side and Zsh on the WSL(Ubuntu) side and integrate it in VSCode and IntelliJ.

powershell         zsh

@ferr0
ferr0 / oh-my-posh-install.md
Created November 3, 2024 16:03 — forked from fullmetalbrackets/oh-my-posh-install.md
Quick Guide - Install Oh-My-Posh in Windows Terminal or PowerShell with winget

Pre-Requisites

This guide will use the winget CLI tool to install and configure Oh-My-Posh. If you haven't already, I suggest installing Windows Terminal from the Microsoft Store and use Oh-My-Posh with it. If you'd rather not use Windows Terminal for some reason, you can still use Oh-My-Posh with PowerShell. Whichever you choose, check out these instructions to install winget.


Install Oh-My-Posh

winget install JanDeDobbeleer.OhMyPosh -s winget
@ferr0
ferr0 / .colors
Created October 26, 2024 23:34 — forked from daytonn/.colors
Bash Color functions
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
@ferr0
ferr0 / ansi_colors
Created October 26, 2024 23:34 — forked from inexorabletash/ansi_colors
Bash color utilities
#!/usr/bin/env bash
# Usage:
# echo -e "... $(text-style style ...) ..."
# echo -e "... $(text-reset) ..."
# echo -e "... $(text-color r g b) ..."
# echo -e "... $(background-color r g b) ..."
#
# Where:
# styles:
@ferr0
ferr0 / .ansible.cfg
Created September 6, 2024 19:23 — forked from wbcurry/.ansible.cfg
Ansible: .ansible.cfg
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
@ferr0
ferr0 / openwrt-hacking.md
Created September 2, 2024 15:00 — forked from shakahl/openwrt-hacking.md
OpenWrt Hacking

OpenWrt Hacking

Guides

More space for packages with extroot on your OpenWrt router

If you would like to install extra packages on OpenWrt, but you have run out of space on your router’s internal flash memory, then this tutorial is for you.

The plan is to copy the OpenWrt’s root filesystem onto an external USB flash drive, and tell the router to switch to that when it boots up.

@ferr0
ferr0 / .golangci.yml
Created April 10, 2024 11:30 — forked from maratori/.golangci.yml
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.57.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@ferr0
ferr0 / README.md
Created December 28, 2023 07:28 — forked from Sugaroverdose/README.md
Automatic creation of 70-persistent-net.rules on CentOS 7 with net.ifnames=0 and biosdevname=0

Automatic creation of 70-persistent-net.rules on CentOS 7 with net.ifnames=0 and biosdevname=0

All quoted scripts are direct copy from latest CentOS 6

  • Logon under root or sudo -s

  • Create "/lib/udev/write_net_rules" file with content:

#!/bin/sh -e
#
# Copyright (C) 2006 Marco d'Itri <[email protected]>
@ferr0
ferr0 / Compile Mainline Kernel (5.15.0) from WSL2.md
Created June 17, 2023 23:13 — forked from oleksis/Compile Mainline Kernel (5.15.0) from WSL2.md
Steps for compile Mainline Kernel Linux using WSL2

Compile Mainline Kernel for WSL2

Steps for compile Kernel Linux 5.15.0

Actual Kernel

$ uname -a
Linux DESKTOP-ID 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 GNU/Linux

Work Dir linux