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 | |
######## ######## ######## ######## ######## ######## ########### | |
### THIS BASH SCRIPT WILL COMPLETE DELETE *EVERY* OBJECT #### | |
### INCLUDING HIDDEN VERSIONS FROM AN S3 BUCKET!! #### | |
######## ######## ######## ######## ######## ######## ########### | |
BUCKET_NAME="$1" | |
if [[ -z "$BUCKET_NAME" ]]; then |
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
package router | |
import ( | |
"encoding/json" | |
"html/template" | |
"io/fs" | |
"net/http" | |
) | |
var commonMiddleware = []Middleware{} |
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
""" | |
A build script for golang projects | |
""" | |
APP_NAME=<your app name here> | |
if [[ $(uname -m) == "x86_64" ]]; then | |
APP_ARCH=amd64 | |
elif [[ $(uname -m) == "i686" ]]; then | |
APP_ARCH=386 | |
elif [[ $(uname -m) == "arm64" ]]; then |
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 | |
# This script is used to execute terraform commands in the current working directory, using Docker. | |
# USAGE: ./terraform_docker.sh <init, plan, apply, or any other valid terraform argument> | |
# NOTE: You will need to ensure this file is executable. You can do this by executing `chmod +x ./terraform_docker.sh`. | |
# !!!!!!!!!!!!!!!!! TERRAFORM CLOUD !!!!!!!!!!!!!!!!! | |
# NOTE: As written, this script assumes you have a credentials.tfrc.json file, which is |
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
{ | |
"editor.inlineSuggest.enabled": true, | |
"github.copilot.enable": { | |
"*": true, | |
"yaml": true, | |
"plaintext": true, | |
"markdown": false | |
}, | |
"json.schemas": [], | |
"workbench.colorTheme": "Ayu Light Bordered", |
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
#! python | |
""" | |
This script is used to apply terraform changes to a given directory. | |
ANY STATE CHANGES STORED LOCALLY WILL BE LOST. | |
It is HIGHLY RECOMMENDED that you use this with a remote terraform backend. | |
Maintainer: Joshua Schlichting <[email protected]> | |
""" |
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 -t pyshell . -f-<<EOF | |
FROM python:latest | |
RUN useradd -m -U -G staff -s /bin/bash devuser | |
USER devuser | |
WORKDIR /home/devuser | |
RUN mkdir /home/devuser/bin | |
ENV POETRY_HOME="/home/devuser/bin/poetry" | |
RUN curl -sSL https://install.python-poetry.org | python - | |
ENV PATH="/home/devuser/bin/poetry/bin:$PATH" |
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
# 30 requests per minute limit for DDoS protection | |
limit_req_zone $binary_remote_addr zone=landing:20m rate=7000r/m; | |
server { | |
listen 443 ssl; | |
server_name yoursite.com; | |
ssl_certificate /etc/nginx/ssl/certificate.crt; | |
ssl_certificate_key /etc/nginx/ssl/private.key; |
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 | |
# Tested on Ubuntu 19.10 with Gnome | |
# Hardware: HP Spectre x360 (13-AW0023DX) | |
gpasswd -a $USER input | |
apt install libinput-tools | |
apt install xdotool | |
apt install ruby | |
gem install fusuma | |
mkdir ~/.config/fusuma | |
cat << 'EOF' >> ~/.config/fusuma/config.yml |
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
file_rows = [] | |
with open("/var/log/secure", 'r') as file: | |
for line in file.readlines(): | |
file_rows.append(line) | |
filtered_rows = [] | |
for row in file_rows: | |
if "Failed password for" in row: | |
filtered_rows.append(row) |