Skip to content

Instantly share code, notes, and snippets.

{
"config": {
"url": "https://www.googleapis.com/youtube/v3/captions/NYbIq54D-2VxqevHM6wB8viPJx5dc5RCwbXzaPEYNTs%3D",
"method": "GET",
"headers": {
"x-goog-api-client": "gdcl/3.1.1 gl-node/12.11.0 auth/5.5.1",
"Accept-Encoding": "gzip",
"User-Agent": "google-api-nodejs-client/3.1.1 (gzip)",
"Authorization": "Bearer ya29.Il-iB7nRPVXVld-8P0zX6oSRMC5Z9bQPEUsUd0ZgiXvVqPHYoIltc83jAtGJ_b0f2Ci1_3BQaamaEFBLc5Irif7FiZAUksG_Pu0_1JY72Fu-HtNUZmSYtyhSsT6MuOJh4A",
"Accept": "application/json"
// Create a bunch of switches and turn them off.
var switches = new Array(10000).fill(false);
// Loop through every guy switching the switches.
for(var guy = 1; guy < switches.length; guy++)
// Loop through the switches that the guy "switches".
for(var pos = guy; pos < switches.length; pos += guy)
// Negate the state of the switch.
switches[pos] = !switches[pos];
#!/bin/bash
# Break on error.
set -e
# Get all disks.
disks=$(az disk list --query "[].{ id: id, ownerId: ownerId }" -o tsv)
# Delete orphaned disks.
while read id ownerId; do
@twitchax
twitchax / ListIpAddressesForLoadBalancer.sh
Last active September 27, 2023 12:23
Azure CLI: List public IP addresses for load balancer.
#!/bin/bash
# Sample load balancer here: https://github.com/Azure/azure-quickstart-templates/tree/master/201-2-vms-loadbalancer-lbrules.
# Break on error.
set -e
# Set variables.
subId="96ca48bb-8d94-410b-ab81-5a44883c619f"
resourceGroupName=lbgroup2
lbName=myLB

Keybase proof

I hereby claim:

  • I am twitchax on github.
  • I am twitchax (https://keybase.io/twitchax) on keybase.
  • I have a public key whose fingerprint is 7A69 B6D0 91FA 7040 CBF9 9FF1 6105 260F F92A 52E7

To claim this, I am signing this object: