Skip to content

Instantly share code, notes, and snippets.

@hyperupcall
hyperupcall / settings.jsonc
Last active September 19, 2024 16:20
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@hyperupcall
hyperupcall / goto.sh
Last active August 21, 2022 05:01
Dumb Bash Goto
# shellcheck shell=bash
goto() {
local current_file="$0"
local label="$1"
# shellcheck disable=SC1090
source <(
local eval_line='no'
@hyperupcall
hyperupcall / lookahead.sh
Created December 12, 2021 10:17
Hacky lookahead / peek with `read -N1`
# shellcheck shell=bash
# Caveat: Only one start_peek can be ran for any particular case block
start_peek() {
if [ "$peek_status" = not_peeking ]; then
peek_status='currently_peeking'
peek_current=0
peek_total="$1"
REPLY_PEEKED_CHARACTERS="$2"
@hyperupcall
hyperupcall / keybase.md
Last active July 16, 2021 17:29
keybase.md

Keybase proof

I hereby claim:

  • I am hyperupcall on github.
  • I am kofler (https://keybase.io/kofler) on keybase.
  • I have a public key ASDvl9eavF5GcQPBYILol_kSykhUEmf4100BewIrJ4WgHAo

To claim this, I am signing this object:

#!/usr/bin/env bash
IsShellVariable() { declare -p $1; } &>/dev/null
PrintShellVariable() {
if IsShellVariable $@; then
echo [\'$1\' as Shell Variable]: "${!1}"
else
echo [\'$1\' as Shell Variable]: "NOT FOUND"
return 1
fi
@hyperupcall
hyperupcall / change-master-branch-to-main.sh
Last active May 14, 2021 04:35
Cross-platform shell script to change the 'master' branch to 'main' for the local and remote repository
#!/bin/sh -eu
# code licensed under BSD 2-Clause "Simplified" License
# see `change-master-branch-to-main.sh --help` for usage
# see twitter thread for more details: https://twitter.com/EdwinKofler/status/1272729160620752898
site="github.com"
oldDefaultBranch="master"
newDefaultBranch="main"
FROM python:3
WORKDIR /usr/src/app
COPY . .
RUN pip install flask waitress
EXPOSE 8080
@hyperupcall
hyperupcall / meta.yml
Last active February 10, 2020 03:14
my cloud init snippets
instance-id: 60a5a5b4-5c2f-4b7c-ade5-1d07483a2725
@hyperupcall
hyperupcall / macro.vba
Last active January 23, 2020 12:32
excel macro for updating some charts
Sub recreateEdwinForecast(dateDifference As Integer, startRow As String, endRow As String, startDate As String, endDate As String)
Sheets("Edwin").Select
ActiveWindow.SelectedSheets.Delete
Sheets("Main").Select
Range("A" & startRow & ":C" & endRow).Select
ActiveWorkbook.CreateForecastSheet Timeline:=Sheets("Main").Range("A" & startRow & ":A" & endRow), _
Values:=Sheets("Main").Range("C" & startRow & ":C" & endRow), ForecastEnd:=endDate, ConfInt _
:=0.95, Seasonality:=1, ChartType:=xlForecastChartTypeLine, Aggregation _
:=xlForecastAggregationAverage, DataCompletion:= _
xlForecastDataCompletionInterpolate, ShowStatsTable:=False