Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / .gitignore
Last active March 22, 2023 04:07
Azure Container Groups with local mounted shared path and init container
.vscode/
.terraform/
*.hcl
*.info
*.tfstate
*.backup
@cicorias
cicorias / REAMDE.md
Created February 16, 2023 00:06 — forked from miguelmota/REAMDE.md
Golang Standard Project Layout

Forked from golang-standards/project-layout


Standard Go Project Layout

This is a basic layout for Go application projects. It represents the most common directory structure with a number of small enhancements along with several supporting directories common to any real world application.

Clone the repository, keep what you need and delete everything else!

@cicorias
cicorias / bash_strict_mode.md
Created January 24, 2023 17:17 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@cicorias
cicorias / rerunrepair.ps1
Created January 15, 2023 15:23
fix the ms defender cluster
$list = get-wmiobject win32_product | select identifyingnumber
foreach ($obj in $list) {
Write-Host ($obj | Format-List | Out-String)
msiexec /fs $obj.identifyingnumber /q
Start-Sleep 10
}
@cicorias
cicorias / build-arm-none-eabi-gdb.sh
Created September 14, 2022 18:22 — forked from ilg-ul/build-arm-none-eabi-gdb.sh
Build the ARM version of GDB on OS X.
#! /bin/bash
set -euo pipefail
IFS=$'\n\t'
GDB_VERSION="7.10"
GDB_BUILD_FOLDER="~/Work/gdb"
mkdir -p "${GDB_BUILD_FOLDER}"
cd "${GDB_BUILD_FOLDER}"
@cicorias
cicorias / remote-wsl.md
Created August 21, 2022 16:48 — forked from mattbell87/remote-wsl.md
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Change your OpenSSH shell

SSH to your Windows host (SSH Server must be installed in Windows Features)

ssh user@windowshost
@cicorias
cicorias / parse_dfsio.py
Created July 22, 2022 20:47
Parses output from Hadoop DFSIO utility
#!/usr/bin/env python3
def parse_file(file_name):
keys = list()
rows = list()
row = dict()
with open(file_name, 'r') as log:
items = [line.split(':', 1) for line in log]
for item in items:
@cicorias
cicorias / uuidv7.c
Created July 14, 2022 01:25 — forked from fabiolimace/uuidv7.c
UUID v7 for C
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/random.h>
#define UUID_T_LENGTH (16)
#define UNIX_TS_LENGTH (6)
@cicorias
cicorias / direnv-win.md
Created July 5, 2022 13:57 — forked from rmtuckerphx/direnv-win.md
Steps to install direnv on Windows

direnv on Windows

Overview

In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env file for local development. But dotenv requires you to add code to your project. With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.

Steps to install

For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.

  1. Create a folder such as c:\tools to put the direnv.exe file and add it to the Windows PATH
@cicorias
cicorias / .bash_profile
Created May 6, 2022 18:35 — forked from gowravshekar/.bash_profile
Hive 2.3.3 with Hadoop 3.1.0 on Mac OS
export HADOOP_HOME=/Users/username/Tools/hadoop-3.1.0
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
alias hstart=$HADOOP_HOME/sbin/start-all.sh
alias hstop=$HADOOP_HOME/sbin/stop-all.sh
export HIVE_HOME=/Users/username/Tools/apache-hive-2.3.3-bin
export PATH=$PATH:$HIVE_HOME/bin