Skip to content

Instantly share code, notes, and snippets.

View lucasmaurice's full-sized avatar

Sonic lucasmaurice

View GitHub Profile
2024-03-05T22:40:19-05:00 fail: Ombi.ErrorHandlingMiddleware[0]
2024-03-05T22:40:19-05:00 Something bad happened, ErrorMiddleware caught this
2024-03-05T22:40:19-05:00 System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
2024-03-05T22:40:19-05:00 ---> System.TimeoutException: A task was canceled.
2024-03-05T22:40:19-05:00 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
2024-03-05T22:40:19-05:00 at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
2024-03-05T22:40:19-05:00 at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-03-05T22:40:19-05:00 at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth,
@lucasmaurice
lucasmaurice / dns_update.sh
Created August 13, 2023 02:57
This script will get current Public IP, and check if the IP match the Cloudflare record.
#!/bin/bash
# REQUIREMENTS:
# - curl
# - jq
# Required environment variables:
# CF_TOKEN: ------------ Cloudflare API token
# CF_ZONE: ------------- Cloudflare zone ID
# CF_ENTRY: ------------ Cloudflare DNS record ID
@lucasmaurice
lucasmaurice / settings.json
Created July 26, 2023 20:03
Basic VS Code config file.
{
"editor.formatOnSave": true,
"editor.inlineSuggest.enabled": true,
"editor.minimap.enabled": false,
"editor.suggestSelection": "first",
"explorer.confirmDragAndDrop": false,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
@lucasmaurice
lucasmaurice / cleanup-vm.sh
Created April 30, 2023 22:47
This one clean up an Ubuntu installation before creating a template.
#!/usr/bin/bash
echo '> Begin Cleanup script'
echo '> Cleaning all audit logs ...'
sudo service rsyslog stop
if [ -f /var/log/audit/audit.log ]; then
cat /dev/null > /var/log/audit/audit.log
fi
@lucasmaurice
lucasmaurice / README.md
Last active May 26, 2023 14:44
Paste to keyboard with Auto Hotkey v1: https://www.autohotkey.com/

This script allow you to send from keyboard the content of the clipboard.

The current config will type the content of the clipboard when CTRL+K is pressed.

@lucasmaurice
lucasmaurice / autoextend-rootfs.sh
Last active March 27, 2023 18:29
Bash script that extend the root filesystem non-interactively and without rebooting the system.
# Get the root filesystem
FS_TYPE=$(df -T / | grep -v Filesystem | awk '{print $2}')
FS_DEVICE=$(df -T / | grep -v Filesystem | awk '{print $1}')
# Get VG and LV from the root filesystem
VG=$(lvdisplay $FS_DEVICE | grep "VG Name" | awk '{print $3}')
# Get the disk and partition number
DISK=$(pvs | grep $VG | awk '{print $1}' | rev | cut -d/ -f1 | rev | sed 's/[0-9]*//g')
PART=$(pvs | grep $VG | awk '{print $1}' | rev | cut -d/ -f1 | rev | sed 's/^[^0-9]*//')
@lucasmaurice
lucasmaurice / Readme.md
Last active April 27, 2021 18:08
CentOS Disable IPv6.

Run this:

bash <(curl -s https://gist.github.com/lucasmaurice/ba2b0e72963683a5e395ff2ed20a8825/raw/987bb7f87749ffe1d05e7e0db4f6d4910c2d8a65/disable-ipv6.sh)
@lucasmaurice
lucasmaurice / cloudinit.yml
Last active August 13, 2020 19:57
Rancher2 Cloud Init
#cloud-config
#
# This is an example file to automatically configure resolv.conf when the
# instance boots for the first time.
#
# Ensure that your yaml is valid and pass this as user-data when starting
# the instance. Also be sure that your cloud.cfg file includes this
# configuration module in the appropriate section.
#
manage_resolv_conf: true
function FindProxyForURL(url, host) {
// If the hostname matches, use proxy.
if (
shExpMatch(host, "*.home") ||
shExpMatch(host, "192.168.1.*")
) {
return "SOCKS localhost:8080";
}
@lucasmaurice
lucasmaurice / CTF Cheat Sheet.md
Last active April 22, 2024 10:44
A Cheat Sheet for CTF.

Sysadmin CTF Cheat Sheet

SYSADMIN

STEPS

  • bash history

  • Check Home folder and inspect files