Runs locally, no installation. enter email/password on commandline. then copy/paste the generated token.
npx generate-tesla-token
Hi! I'm going to generate a Tesla-login ‘token’ for you, which will allow
| ### Add trailing slash if needed | |
| STR="/i/am/a/path" | |
| length=${#STR} | |
| last_char=${STR:length-1:1} | |
| [[ $last_char != "/" ]] && STR="$STR/"; : | |
| echo "$STR" # => /i/am/a/path/ |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| git checkout -b upstream | |
| git remote add upstream git@github.com/upstream1/blah.git | |
| git fetch upstream # or use -f in git remote add | |
| git merge -s subtree upstream/master --allow-unrelated-histories -X theirs |
| #!/bin/sh | |
| sudo service fwupd start | |
| # download metadata from https://cdn.fwupdate.org/downloads/firmware.xml.gz | |
| sudo fwupdmgr refresh | |
| # Output if any upgrades for each of the uefi firmare modoles | |
| sudo fwupdmgr update |
| @ECHO off | |
| :top | |
| CLS | |
| ECHO Choose a shell: | |
| ECHO [1] cmd | |
| ECHO [2] bash | |
| ECHO [3] PowerShell | |
| ECHO [4] PowerShell Core | |
| ECHO [5] Python | |
| ECHO [6] Visual Studio Developer Command Prompt |
| #!/bin/sh | |
| # for autolock, have xautolock call this script: | |
| # xautolock -time 10 -locker lock.sh -enable | |
| scrot /tmp/screenshot.png | |
| convert /tmp/screenshot.png -blur 0x7 -blue-shift 1.5 /tmp/screenshotblur.png | |
| rm /tmp/screenshot.png | |
| i3lock -i /tmp/screenshotblur.png |
| // Ensure we enroll ecs with long resource IDs | |
| // Delete after April 1st as all new accounts will be enrolled by default | |
| resource "null_resource" "enable_long_ecs_resource_ids" { | |
| provisioner "local-exec" { | |
| command = <<EOF | |
| # $1=account_id, $2=region | |
| source ${path.root}/../scripts/assume_role.sh \ | |
| ${var.workload_account_id} \ | |
| ${var.workload_provider_region} |
| #!/bin/sh | |
| # Call from the organization master accounts credentials after creating the account. | |
| # Pass in the new account id. | |
| aws support create-case --service-code customer-account --category-code other-account-issues --subject "Please add account $1 to our enterprise support plan" --severity-code low --communication-body "Please add account $1 to my organizations enterprise support plan" |
| #!/bin/bash | |
| sudo apt install -y checkinstall libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake | |
| cd /tmp | |
| # clone the repository | |
| git clone https://www.github.com/Airblader/i3 i3-gaps | |
| cd i3-gaps | |
| # compile & install |