Skip to content

Instantly share code, notes, and snippets.

View grenade's full-sized avatar

rob thijssen grenade

View GitHub Profile
foreach ($location in @('EastUS')) {
Get-AzVmSize -Location $location | % {
New-Object -TypeName PSobject -Property @{
Name = $_.Name;
NumberOfCores = $_.NumberOfCores;
MemoryInMB = $_.MemoryInMB;
MaxDataDiskCount = $_.MaxDataDiskCount;
OSDiskSizeInMB = $_.OSDiskSizeInMB;
ResourceDiskSizeInMB = $_.ResourceDiskSizeInMB;
Family = $(switch -regex ($_.Name) {
# usage:
# Invoke-Expression (New-Object Net.WebClient).DownloadString(('https://gist.githubusercontent.com/grenade/3f2fbc64e7210de136e7eb69aae63f81/raw/build-azure-images.ps1?{0}' -f [Guid]::NewGuid()));
# job settings. change these for the tasks at hand.
$targetCloudPlatform = 'azure';
$workFolder = ('{0}{1}{2}-ci' -f 'D:', ([IO.Path]::DirectorySeparatorChar), $targetCloudPlatform);
$imagesToBuild = @(
('win7-32-{0}' -f $targetCloudPlatform),
('win7-32-gpu-{0}' -f $targetCloudPlatform)
);
# generate keypair
openssl req -new -x509 -newkey rsa:4096 -keyout ~/.ssh/nvidia-module-private.key -outform DER -out ~/.ssh/nvidia-module-public.key -nodes -days 3650 -subj "/CN=nvidia-kernel-module"
# enroll public key in mok list (see https://docs.fedoraproject.org/en-US/Fedora/23/html/System_Administrators_Guide/sect-enrolling-public-key-on-target-system.html)
sudo mokutil --import ~/.ssh/nvidia-module-public.key
@grenade
grenade / cv-00-contact.md
Last active November 5, 2024 11:08
this is the content that supports my cv at https://grenade.github.io/cv which is a react app on github pages at https://github.com/grenade/cv

Rob Thijssen - Curriculum Vitae

  • Citizenship:
    • Netherlands
    • United Kingdom
  • Residence: Bansko, Bulgaria
  • Timezone: Eastern European Time
    • EEST (UTC +0300): Apr ~ Oct
    • EET (UTC +0200): Nov ~ Mar
  • Language: English
  • Pronoun: He/Him
@grenade
grenade / .taskcluster.yml
Last active July 15, 2020 11:09
repeat a set of tasks (a configurable number of times) each with a set of commands on multiple taskcluster worker types
---
provisionerId: relops-3
workerType: decision
retries: 5
priority: highest
created: '2020-07-08T07:00:36.378Z'
deadline: '2020-07-08T10:00:36.378Z'
routes:
- index.project.relops.worker-observation.decision
scopes:
#!/bin/bash
#while true; do if [[ "$(hg pull --rebase https://hg.mozilla.org/mozilla-central)" != *"no changes found"* ]]; then if [ $? -eq 0 ]; then hg push try -f; else echo "manual merge required"; exit; fi; else echo "no changes found"; fi; sleep 600; done
while true; do
if [[ "$(hg pull --rebase https://hg.mozilla.org/mozilla-central)" != *"no changes found"* ]]; then
if [ $? -eq 0 ]; then
hg push try -f
else
echo "manual merge required"
#!/bin/bash
# curl -L https://gist.github.com/grenade/109bfd61a663902236e1d3f6530dec55/raw/tt_upload.sh | sh
tooltool_token_path=${HOME}/.tooltool.token
tooltool_url=https://tooltool.mozilla-releng.net
tooltool_client_url=https://raw.githubusercontent.com/mozilla-releng/tooltool/master/client/tooltool.py
wrk_dir=$(pwd)
tmp_dir=$(mktemp -d)
https://send.firefox.com/download/5e04ed64c8/#Mcjb8-1FrvuJv6A3bwerpQ
https://send.firefox.com/download/bed57601b7/#DytbMzvMYM9QSEZtQYRJcw
@grenade
grenade / disable-windefend.ps1
Created November 28, 2018 17:53
Disable Windows Defender
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableConfig' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableAntiSpyware' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\wscsvc' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\SecurityHealthService' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdBoot' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdFilter' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisDrv' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc' -name 'Start' -type 'Dword' -v
@grenade
grenade / color.sh
Created October 23, 2018 08:33
I don't remember where this script came from (I didn't write it), but it's a hoot.
#!/bin/bash
useage() {
printf "\n\e[1;4mAscii Escape Code Helper Utility\e[m\n\n"
printf " \e[1mUseage:\e[m colors.sh [-|-b|-f|-bq|-fq|-?|?] [start] [end] [step]\n\n"
printf "The values for the first parameter may be one of the following:\n\n"
printf " \e[1m-\e[m Will result in the default output.\n"
printf " \e[1m-b\e[m This will display the 8 color version of this chart.\n"
printf " \e[1m-f\e[m This will display the 256 color version of this chart using foreground colors.\n"
printf " \e[1m-q\e[m This will display the 256 color version of this chart without the extra text.\n"