Skip to content

Instantly share code, notes, and snippets.

View beatcracker's full-sized avatar
🚝
Blaine the Mono

beatcracker

🚝
Blaine the Mono
View GitHub Profile
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@balmeida-nokia
balmeida-nokia / wsl2_ciscoanyconnect_workaround.md
Last active May 3, 2024 02:43 — forked from pyther/wsl2_ciscoanyconnect_workaround.md
WSL 2 Cisco AnyConnect Networking Workaround

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Acknowledges

@YoraiLevi
YoraiLevi / Download-AppxPackage.ps1
Last active February 19, 2024 12:45
Download Windows Store Apps with Powershell
#https://serverfault.com/questions/1018220/how-do-i-install-an-app-from-windows-store-using-powershell
#Usage:
# > Download-AppxPackage "https://www.microsoft.com/p/dynamic-theme/9nblggh1zbkw" "$ENV:USERPROFILE\Desktop"
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30233.0_neutral_~_jdggxwd41xcr0.AppxBundle
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30234.0_neutral_~_jdggxwd41xcr0.AppxBundle
# C:\Users\user\Desktop\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.Services.Store.Engagement_10.0.19011.0_x64__8wekyb3d8bbwe.Appx
# C:\Users\user\Desktop\Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.Appx
@hermanbanken
hermanbanken / kustomize_vars.md
Created November 22, 2020 13:11
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services
@limitusus
limitusus / zero_division.md
Last active June 28, 2023 06:26
Zabbix: handle calculated item with zero division

Problem

Want to create a calculated item with last("X") / last("Y"). When Y = 0, the result should be 0.

Answer

last("X") * (1 - count("Y",#1,0)) / (last("Y") + count("Y",#1,0))
@vantezzen
vantezzen / porkbun_domain_search.js
Created November 6, 2018 14:45
Search domains on porkbun.com that are under a given price
/**
* Porkbun.com: Search domain names under certain price
*
* by vantezzen (https://github.com/vantezzen)
*
* Instructions:
* 1. Go to https://porkbun.com/products/domains
* 2. Open JavaScript Console
* 3. Copy and paste this code into the console
* 4. Before executing, customize the `config` object to your needs
@coryshaw1
coryshaw1 / saliensHack.user.js
Last active September 2, 2023 13:05
Saliens Hack UserScript - AutoSelect Planet, Invincibility, InstaKill
// ==UserScript==
// @name Saliens Hack
// @description Saliens Hack for Steam Summer Sale 2018 Game - AutoSelect Planet, Invincibility, InstaKill
//
// @author Cory "mbsurfer" Shaw
// @namespace http://github.com/coryshaw1
// @downloadURL https://gist.github.com/coryshaw1/ed51d13baa8191f53f489b9de25cc868/raw/b4807713964a9b67e1b8d7837256845b078a51c6/saliensHack.user.js
//
// @license GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
// @copyright Copyright (C) 2018, by Cory Shaw
@aeronxyc
aeronxyc / salienHacks.js
Last active June 21, 2018 21:45 — forked from coryshaw1/salienHacks.js
Salien Invincibility/AutoKill - Steam Summer Sale 2018
setInterval(function(){
if (!gGame || !gGame.m_State || !gGame.m_State.m_EnemyManager) return;
if (!gGame.m_State.m_EnemyManager.m_EnemyData) return;
gGame.m_State.m_EnemyManager.m_EnemyData.slime.base_health = gGame.m_State.m_EnemyManager.m_EnemyData.volvoian.base_health = gGame.m_State.m_EnemyManager.m_EnemyData.neomorph.base_health = 1;
gGame.m_State.m_EnemyManager.m_EnemyData.slime.base_damage = gGame.m_State.m_EnemyManager.m_EnemyData.volvoian.base_damage = gGame.m_State.m_EnemyManager.m_EnemyData.neomorph.base_damage = 0
gGame.m_State.m_ScoreIncrements = 5000;
if (!gGame.m_State.m_EnemyManager.m_rgEnemies) return;