Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active January 14, 2025 21:45
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@inversion
inversion / terraform_resource_move.sh
Last active August 31, 2022 20:08
Update state after moving existing terraform resources to a module
#!/bin/bash
# 1. Fill in your module name
# 2. Run the terraform state mv commands from the output
# Pipeline steps:
# Generate plan
# Remove ANSI colour codes
# Generate state mv commands
# Strip any moves of numbered instances of a resource (i.e. from using count)
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active January 3, 2025 21:54
Ansible variable precedence (order, hierarchy)
@ddieppa
ddieppa / InstallChocolateyPackages.ps1
Last active January 10, 2025 01:47
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@shashyajoshi
shashyajoshi / gcloud_compute_instances_list_csv.output
Created July 2, 2018 21:34
Output of the gcloud instances list command in CSV format
$ gcloud compute instances list - format="csv(name,labels.app-name,labels.biz-unit,labels.env-name,metadata.items.server-role,metadata.items.server-type, metadata.items.os-image)"
name,app-name,biz-unit,env-name,server-role,server-type,os-image
app-server-1,misc,ecom,prod,app,tomcat,centos
web-server-1,misc,ecom,prod,web,nginx,centos
web-server-2,misc,ecom,prod,web,nginx,centos
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { inherit system; };
callPackage = pkgs.lib.callPackageWith (pkgs // self);
self = with pkgs; {
etlegacy = callPackage_i686 ./etlegacy.nix {};
};
in self.etlegacy
@ashleyghooper
ashleyghooper / default.nix
Last active March 23, 2023 01:37 — forked from BrechtSerckx/default.nix
etlegacy
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { inherit system; };
callPackage = pkgs.lib.callPackageWith (pkgs // self);
self = with pkgs; {
etlegacy-x86 = callPackage_i686 ./etlegacy-x86.nix { usePrecompiledModLibs = true; };
etlegacy-x86_64 = callPackage ./etlegacy-x86_64.nix { usePrecompiledModLibs = true; };
};
in self.etlegacy-x86 # or self.etlegacy-x86_64
@ashleyghooper
ashleyghooper / Vagrant_setup,md
Last active October 29, 2024 15:59
Vagrant +Windows + WSL2 + Hyper-v
# Vagrant With Windows, WSL2 and Hyper-V
To say getting this configuration working is a pain in the ass is an understatement. However, once it is working correctly you gain access to tools like Ansible and full performance VMs inside Windows. This guide covers the steps I followed to get things working correctly with this configuration. It is possible that something may not work for you however I have been able to reproduce this success on two Windows 11 Pro machines and expect this to work for others.
This guide assumes basic knowledge of Windows and Linux systems and how Vagrant operates. Due to the difficulty of setting this up you may need to do some additional troubleshooting
## Requirements
* Windows Professional - Hyper-V can only be installed on Windows Professional systems or higher
* WSL2 - Due to the massive differences between WSL1 and WSL2 this guide will only cover support for WSL2
* CPU Virtualization - While the vast majority of modern CPUs support virtualization you may need to enable it in