A simple website to extract the code from an OAuth2 callback.
If state
exists, output the URL instead
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
{ | |
"utc_url": "https://worldtimeapi.org/api/timezone/UTC", | |
"time_offset": -5, | |
"alarms": ["06:00", "19:41"], | |
"alarm_duration": 2 | |
} |
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
# docker build --file Dockerfile-devenv.txt -t devenv . | |
# docker run -it --name devenv -p 4200:4200 -d devenv zsh | |
FROM ubuntu:latest | |
ARG USERNAME=user | |
ARG USER_UID=1000 | |
ARG USER_GID=$USER_UID | |
RUN groupadd --gid $USER_GID $USERNAME \ | |
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ |
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 python_on_whales import docker | |
output = docker.run(image="ubuntu", detach=True, tty=True, interactive=True, publish=[(80, 80), (8080, 8080)], name = "hello", remove=True) | |
# Both are equal | |
print(output) | |
print(docker.container.inspect(output)) | |
docker.container.execute(container = output, command = "bash", tty=True, interactive=True) | |
docker.container.remove(output, force=True) |
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
set backupdir=$HOME/vimfiles/tmp/ | |
set undodir=$HOME/temp/vimfiles/tmp/ |
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/bash | |
# Edited code from https://opensource.com/article/21/1/go-cross-compiling | |
# xgo (https://github.com/techknowlogick/xgo) is a better solution for programs which use more than one Go file | |
archsLinux=(amd64 arm64 arm) | |
archsWindows=(amd64 arm arm64 386) | |
programName= | |
for arch in ${archsLinux[@]} | |
do | |
env GOOS=linux GOARCH=${arch} go build -o ../binaries/${programName}_linux_${arch} main.go |
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
x() { | |
cd /media/<user>/<drive>/"${1:-}" | |
} |
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
git clone https://github.com/FD-/RPiPlay.git | |
cd RPiPlay | |
sudo apt-get install cmake -y | |
sudo apt-get install libavahi-compat-libdnssd-dev -y | |
sudo apt-get install libplist-dev -y | |
sudo apt-get install libssl-dev -y | |
sudo apt-get install libx264-dev libjpeg-dev -y | |
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-gl gstreamer1.0-gtk3 --fix-missing -y | |
mkdir build |
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
[Unit] | |
Description= minecraft server service | |
[Service] | |
User=pi | |
WorkingDirectory=/home/pi/minecraft-servers/survival-1.18.2 | |
ExecStart=/usr/bin/java -Xms512M -Xmx2048M -jar /home/pi/minecraft-servers/survival-1.18.2/spigot-1.18.2.jar nogui | |
[Install] | |
WantedBy=multi-user.target |
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
# How to create systemd services: http://neilwebber.com/notes/2016/02/10/making-a-simple-systemd-file-for-raspberry-pi-jessie/ | |
[Unit] | |
Description= Hello, world! | |
[Service] | |
User= <put user here> | |
WorkingDirectory=<put directory the command should be run in> | |
ExecStart=<path to command> | |
[Install] | |
WantedBy=multi-user.target |
NewerOlder