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
| # These steps are known to work on a rpi1,2 and 3. | |
| # tested with the Samsung SCX-3400 are needed | |
| sudo apt install avahi-daemon cups printer-driver-splix | |
| sudo usermod -a -G lpadmin pi | |
| sudo cupsctl --remote-any | |
| # enable the daemons | |
| sudo systemctl enable cups | |
| sudo systemctl enable avahi-daemon |
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
| #remove the azure cli if installed via apt: | |
| sudo apt remove azure-cli | |
| #install the azure cli with pip: | |
| sudo python3 -m pip install msrest==0.6.21 | |
| sudo python3 -m pip install azure.cli |
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
| tested on Fedora release 34 (Thirty Four): | |
| sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
| echo -e "[azure-cli] | |
| name=Azure CLI | |
| baseurl=https://packages.microsoft.com/yumrepos/azure-cli | |
| enabled=1 | |
| gpgcheck=1 | |
| gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/azure-cli.repo" |
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
| # Use these steps to clear out Github's commit history. | |
| # Useful when moving a repo from private to public | |
| git checkout --orphan newBranch | |
| git add -A # Add all files and commit them | |
| git commit | |
| git branch -D main # Deletes the main branch | |
| git branch -m main # Rename the current branch to main | |
| git push -f origin main # Force push master branch to github | |
| git gc --aggressive --prune=all # remove the old files |
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
| az_rm_sp()(az ad sp list --show-mine -o json --query "[?contains(displayName, '$1')]" | jq -r '.[] | .appId' | xargs -P 4 -n 12 -I % az ad sp delete --id %) | |
| example: | |
| az_rm_sp azure-cli |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # renameworkspace.py - Renaming i3 workspaces with https://github.com/acrisci/i3ipc-python while keeping the <number>: <letter> prefix for keyboard navigation. | |
| # Written in 2017 by Fahrstuhl | |
| # To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. | |
| # You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
| import i3ipc |
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
| # add this to your bashrc | |
| cilium()(kubectl exec -it $(kubectl get pod -l k8s-app=cilium| head -n 2|tail -n 1 | awk '{print $1}') -- cilium $@) |
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
| C:\Program Files\VcXsrv>vcxsrv.exe -screen 0 @2 -wgl -nodecoration +xinerama -screen 1 @3 -wgl -nodecoration +xinerama -ac | |
| then add this to your ~/.config/i3/config file: | |
| fake-outputs 1920x1200+0+0,1920x1200+1920+0 |
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
| # Switch to the master branch and make sure you are up to date. | |
| git checkout master | |
| git fetch # this may be necessary (depending on your git config) to receive updates on origin/master | |
| git pull | |
| # Merge the feature branch into the master branch. | |
| git merge feature_branch | |
| # Reset the master branch to origin's state. | |
| git reset origin/master |
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
| # from https://www.raspberrypi.org/magpi/dakboard-wall-display/ | |
| # before proceeding, open the Raspberry Pi SD Card (mount that on Linux/Mac) and add the following: | |
| # | |
| # 1. enable ssh | |
| # a) create an empty file called `ssh`. | |
| # 2. enable wifi | |
| # a) create a filled called `wpa_supplicant.conf` with a content similar to this. | |
| ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev |