This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Copyright (c) 2020 Valentin Weber | |
# | |
# After some minor modifications (as marked below) this EventGhost | |
# Python script provides a method to send requests to devices | |
# registered with the Join API <https://joaoapps.com/join/api/> from | |
# any EventGhost Python Script or Command. | |
# | |
# EventGhost usage: `eg.globals.JoinPushDevice(text="hello_world")` | |
## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
######################################## | |
# 🧭 Configuration # | |
######################################## | |
ARCH="$(dpkg --print-architecture)" | |
VERSION_CODENAME="$(grep -oP '(?<=\bVERSION_CODENAME=)[^;]+' /etc/os-release)" | |
URL="https://download.docker.com/linux/raspbian/dists/${VERSION_CODENAME}/pool/stable/${ARCH}/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo mkdir /etc/apt/trusted.gpg.d | |
sudo apt-key export 90FDDD2E | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/raspbian.public.gpg | |
sudo apt-key export 7FA3303E | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/raspberrypi.gpg | |
rm -rf /etc/apt/trusted.gpg | |
rm -rf /etc/apt/trusted.gpg~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* "Bleh" -- a "potato-friendly" cmatrix clone. | |
* | |
* Screenshot: https://i.imgur.com/dt6RmU7.png | |
* | |
* Adapted to Windows from: | |
* https://www.reddit.com/r/commandline/comments/1jcnyht/bleh_a_potatofriendly_cmatrix_clone/ | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove existing "nameserver" lines from /etc/resolv.conf | |
sed -i '/nameserver/d' /etc/resolv.conf | |
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf | |
# we use full path here to support boot command with root user | |
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check these threads before proceeding: | |
# https://github.com/microsoft/WSL/discussions/5857 | |
# https://github.com/microsoft/WSL/issues/5821 | |
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
Exit | |
} | |
# Restart the Host Network Service | |
Restart-Service -Force -Name hns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NEW_ROOT=/new/parent/folder | |
OLD_ROOT=/var/lib | |
sudo systemctl stop docker | |
sudo systemctl stop docker.socket | |
sudo systemctl stop conainerd | |
sudo mkdir -p $NEW_ROOT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a PLUGINS=( | |
"djui/alias-tips" | |
"zdharma-continuum/fast-syntax-highlighting" | |
"zsh-users/zsh-autosuggestions" | |
"zsh-users/zsh-completions" | |
"akarzim/zsh-docker-aliases" | |
"z-shell/zsh-eza" | |
"MichaelAquilina/zsh-you-should-use" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Identify /dev/??? device of card | |
sudo fdisk -l | |
# if mounted (boot), must unmount | |
sudo umount /dev/???? | |
# create image ... | |
sudo dd if=/dev/???? of=./sd_card.img bs=4M status=progress && sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# STEP1: in ~/.p10k.zsh, find and alter: | |
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( | |
os_icon | |
os_version # ADD THIS LINE | |
... | |
) | |
# STEP2: Still in ~/.p10k.zsh, after the `typeset` you just edited, | |
# add the following: |
NewerOlder