Skip to content

Instantly share code, notes, and snippets.

View lucasmaurice's full-sized avatar

Sonic lucasmaurice

View GitHub Profile
@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 / 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 / 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
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,