Skip to content

Instantly share code, notes, and snippets.

View skurhse's full-sized avatar

Skurhse Rage ∅ skurhse

View GitHub Profile
# Set the subscription you want to work with
az account set --subscription <subscription_name>
# Provide the name of your resource group and private endpoint network interface
resource_group="<resource_group_name>"
network_interface="<network_interface_name>"
# Get the private endpoints attached to the specified network interface
private_endpoints=$(az network private-endpoint list --resource-group $resource_group --query "[?networkInterfaces[?id=='$network_interface']].{Id:id}" --output tsv)
@skurhse
skurhse / toolchain.md
Last active May 1, 2023 02:51
Xenia Discord Bot Platform Draft Toolchain
@skurhse
skurhse / main.go
Created April 20, 2023 05:37
Monty Hall Problem
package main
import (
"bufio"
"bytes"
"fmt"
"math/rand"
"os"
"reflect"
"strconv"
@skurhse
skurhse / test.bash
Created March 15, 2023 01:11
Reset line endings in the working directory when *enabling* core.autocrlf
#!/usr/bin/env bash
set -x
git --version
git config --global core.autocrlf false
git config --global core.eol crlf
cd /tmp
rm -rf lua-filters/
git clone https://github.com/pandoc/lua-filters
@skurhse
skurhse / init.lua
Last active May 1, 2023 03:12
~/.config/nvim/init.lua
-- REQ: Configures neovim using lua. <skr 2023-04-30>
-- SEE: https://neovim.io/doc/user/lua-guide.html <>
local call = vim.call
local cmd = vim.cmd
local set = vim.o
-- SEE: https://github.com/junegunn/vim-plug <>
cmd [[
@skurhse
skurhse / gist:36d0a62033cf159fb10f0cb3abdc8d38
Created January 11, 2022 04:27
sudo apt-get install lld llvm llvm-dev
$ make spec
Using /usr/bin/llvm-config-13 [version= 13.0.0]
g++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/lib/llvm-13/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CC="cc -fuse-ld=lld" CRYSTAL_CONFIG_BUILD_COMMIT="a3ee70ca0" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1641471908" ./bin/crystal build -D strict_multi_assign -Dwithout_interpreter --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/all_spec spec/all_spec.cr
ld.lld: error: cannot open _main.o: No such file or directory
ld.lld: error: cannot open S-lice40U-I-nt841.o: No such file or directory
ld.lld: error: cannot open P-ointer40U-I-nt841.o: No such file or directory
ld.lld: error: cannot open A-rgumentE-rror.o: No such file or directory
ld.lld: error: cannot open E-xception5858C-allS-tack.o: No such file or directory
ld.lld: error: cannot open A-rray40P-ointer40V-oid4141.o:
@skurhse
skurhse / declare-n.bash
Created May 15, 2021 04:08
Bash declare -n example
for e in 'key' 'tar' 'sig'
do
declare -n ref="$e"
wget --output-document "${ref[file]}" "${ref[url]}"
done
@skurhse
skurhse / webdev.md
Last active May 30, 2019 07:32
webdev track outline