Skip to content

Instantly share code, notes, and snippets.

View manualbashing's full-sized avatar
:shipit:

Manuel Batsching manualbashing

:shipit:
View GitHub Profile
@manualbashing
manualbashing / system_uuid.sh
Created May 23, 2021 11:38 — forked from bencord0/system_uuid.sh
Unique id for a linux system
#!/bin/bash
cat /var/lib/dbus/machine-id && exit
# Provided by dbus, hence available on all systemd systems.
# Any user can read it and it is persistent accross boots.
# It is unique per installation, and works well in VMs.
# Not all systems (i.e. stage3 gentoo/handbook install)
# have dbus installed by default.
cat /sys/class/dmi/id/product_uuid && exit
@manualbashing
manualbashing / docker.md
Created May 17, 2021 15:38 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

az group list --tag April=April --query [].name -o tsv | % {az group delete --name $_ --yes }
@manualbashing
manualbashing / blog.md
Last active May 12, 2024 15:04 — forked from joncloud/pr.md
Checkout Azure DevOps Pull Requests locally

Forked from piscisaureus

Fetch and checkout one specific pull request

To identify one particular pull request, find the pull request number on the Azure DevOps site:

image

Then fetch and checkout the pull request in a local branch named pull/137

Error in user YAML: (<unknown>): did not find expected ',' or '}' while parsing a flow mapping at line 7 column 11
---
type: {{entry.type}}
author: {{authorString}}
title: {{title}}
year: {{year}}
source: {{zoteroSelectURI}}
tags: log/{{entry.type}}
aliases: {{entry.author.[0].family}}{{year}}, {{title}}
---
@manualbashing
manualbashing / iswitchw.ahk
Created February 11, 2021 12:57
iswitchw - Incrementally switch between windows using substrings
;
; iswitchw - Incrementally switch between windows using substrings
;
; [MODIFIED by ezuk, 3 July 2008, changes noted below. Cosmetics only.]
;
; Required AutoHotkey version: 1.0.25+
;
; When this script is triggered via its hotkey the list of titles of
; all visible windows appears. The list can be narrowed quickly to a
; particular window by typing a substring of a window title.
@manualbashing
manualbashing / install.ps1
Last active December 17, 2020 22:08
PostInstall script for build agent
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]
$AzureDevopsUrl,
[Parameter(Mandatory)]
[string]
$AzureDevopsPat,
@manualbashing
manualbashing / convert-to-spot.ps1
Created December 17, 2020 19:40 — forked from larryclaman/convert-to-spot.ps1
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set
@manualbashing
manualbashing / blog.md
Last active December 10, 2022 17:50
Build a drum grid with emojis in #SonicPi

The other day I was going through one of MrBomb's awesome SonicPi tutorials, where he used a nifty trick with arrays to build a drum grid similar to this one: https://learningmusic.ableton.com/make-beats/make-beats.html

This already worked perfectly, but I thought it could be taken one step further by building the arrays from strings of emojis:

use_bpm 98

open_hat   = "⬜⬜❎⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜".split("")
closed_hat = "❎❎⬜⬜❎⬜❎⬜❎⬜❎⬜❎⬜❎⬜".split("")
clap = "⬜⬜⬜⬜❎⬜⬜⬜⬜⬜⬜⬜❎⬜⬜⬜".split("")
@manualbashing
manualbashing / blog.md
Last active December 16, 2020 11:18
Use azure cli with more readable output

~/.azure/config

[core]
output = table
alias wrap='tput smam'