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 / nervous_beat.rb
Created July 3, 2020 21:25
Nervous Beat #SonicPi
define :whoosh do
use_synth :pulse
play :F, amp: 0.2, release:3, attack:2
play :E, amp: 0.2, release:3, attack:2
sample :ambi_lunar_land, amp: 0.4
end
live_loop :nervous_beep do
with_fx :bitcrusher, phase: 0.5, decay: 8 do
use_synth :saw
@manualbashing
manualbashing / settings.json
Last active August 19, 2020 07:14 — forked from thomasmaurer/settings.json
My Windows Terminal Settings settings.json August 2020
// This file was initially generated by Windows Terminal 1.1.2021.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@manualbashing
manualbashing / webapp_docker_cheatsheet.md
Last active April 21, 2020 12:35
Azure Webapp Docker Cheatsheet

Activate logging for a container:

az webapp log config --name mba-test-server1 --resource-group rg-mba-test --docker-container-logging filesystem

tail logging stream:

 az webapp log tail --name mba-test-server1
@manualbashing
manualbashing / blobs.js
Created April 20, 2020 10:50
List Blobs in Azure
const containerName = "...";
const blobService = storage.createBlobService();
blobService.listBlobsSegmented(containerName, null, function (error, results) {
if (results) {
for (var i = 0, blob; blob = results.entries[i]; i++) {
// Work with blob item .. could be page blob, block blob, etc.
}
}
});
@manualbashing
manualbashing / GetVaultSecrets.ps1
Created April 6, 2020 10:06
Get all secrets of a given vault
Get-AzKeyVaultSecret -VaultName vault20200406104150 | % { Get-AzKeyVaultSecret -VaultName $_.VaultName -SecretName $_.Name } | Select Name,SecretValueText
@manualbashing
manualbashing / spacemacs_cheat_sheet.md
Created April 5, 2020 12:13
Spacemacs favourite commands cheat sheet

Text editing:

  • V : Mark the whole line in visual mode

  • f CHAR: Go to next occurance of CHAR

  • Spc j j: Ivy jump to character

  • Spc t g: togge mode to split windows according to golden ratio

@manualbashing
manualbashing / mount_volume_azure_postinstall.md
Created April 5, 2020 09:59
Mount Volume in ARM script extension

RunOnce RegKey... Wont execute..

Run and RunOnce registry keys cause programs to run each time that a user logs on. The data value for a key is a command line no longer than 260 characters. 

RTFM!!!!!!

Scheduled Task with RunOnce:

@manualbashing
manualbashing / foo.rdp
Created April 2, 2020 07:33
Span rdp session over a subset of your local monitors
full address:s:x.x.x.x:3389
prompt for credentials:i:1
administrative session:i:1
screen mode id:i:2
span monitors:i:1
use multimon:i:1
selectedmonitors:s:0,1
https://www.hanselman.com/blog/HowToRemoteDesktopFullscreenRDPWithJustSOMEOfYourMultipleMonitors.aspx
@manualbashing
manualbashing / remote_procmon.bat
Created April 1, 2020 03:36
Use procmon remotely #sysinternals
# https://4sysops.com/archives/using-process-monitor-procmon-remotely/
@echo off
Psexec.exe -sd \\%1 procmon -accepteula -backingfile c:\temp\proc.pml -quiet
Pause
Psexec.exe -sd \\%1 procmon -accepteula -terminate -quiet
Xcopy \\%1\c$\temp\proc.pml c:\temp\
Del \\%1\c$\temp\proc.pml
Procmon.exe /openlog c:\temp\proc.pm
@manualbashing
manualbashing / em.sh
Last active March 30, 2020 13:21
Install Emacs26 on Ubuntu WSL (SpaceEmacs)
#!/usr/bin/env bash
# Checks if there's a frame open
emacsclient -n -e "(if (> (length (frame-list)) 1) 't)" 2> /dev/null | grep t &> /dev/null
if [ "$?" -eq "1" ]; then
emacsclient -a '' -nqc "$@" &> /dev/null
else
emacsclient -nq "$@" &> /dev/null
fi