Skip to content

Instantly share code, notes, and snippets.

View kam-daniel's full-sized avatar
🎯
Focusing

Daniel Van Den Bosch kam-daniel

🎯
Focusing
  • KAM Plastics
  • 22:16 (UTC -04:00)
View GitHub Profile
@kam-daniel
kam-daniel / debian_auto_upgrades.md
Last active September 4, 2024 21:07
debian_auto_upgrades.md

Work Instruction: Setting Up Automatic Updates for Linux Systems (Debian/Ubuntu-Based)

Purpose:
This document outlines the steps to configure unattended upgrades on Debian-based Linux systems, ensuring that systems automatically receive and apply security updates.


Step 1: Install Unattended Upgrades

@kam-daniel
kam-daniel / codesoft_unix_time.txt
Created September 3, 2024 19:40
in codesoft, this formula will return the current unix time as if your timezone is gmt
(((my_year - 1970) * 365) +
((my_year - 1970) / 4) - if(my_year % 4 = 0,1,0) +
IF(my_month > 1, 31, 0) +
IF(my_month > 2, IF((my_year % 4 = 0), 29, 28), 0) +
IF(my_month > 3, 31, 0) +
IF(my_month > 4, 30, 0) +
IF(my_month > 5, 31, 0) +
IF(my_month > 6, 30, 0) +
IF(my_month > 7, 31, 0) +
IF(my_month > 8, 31, 0) +
@kam-daniel
kam-daniel / raspi_webpage_viewer.md
Last active April 24, 2024 15:43
raspi_webpage_viewer

OS: RaspberryPI Lite users dvandenbosch (sudoer) gui (non sudoer)

install dotfiles (This is for Dan Van Den Bosch own sanity)

Setup Autologin

create this file as root /etc/systemd/system/getty@tty1.service.d/autologin.conf with the following content:

@kam-daniel
kam-daniel / give_me_back_my_g_drive.bat
Last active January 17, 2024 16:11
This is a script to get the m drive returned to users client pcs
@echo off
net use G: \\10.30.1.5\apps /persistent:yes
@echo off
setlocal
set SERVER1=10.30.1.15
set SERVER2=10.30.1.16
for %%i in (%SERVER1%, %SERVER2%) do (
call :logoffUser %%i
)
exit /b
@kam-daniel
kam-daniel / PostgreSQL_needle_in_a_haystack.sql
Created November 13, 2023 16:29 — forked from danielleevandenbosch/PostgreSQL_needle_in_a_haystack.sql
Search all tables inside of PostgreSQL up to a certain size. This is good for finding those smaller tables when a sample of data is given to you.
DO
$$
DECLARE
value int := 0;
sql text := 'The constructed select statement';
rec1 record;
rec2 record;
BEGIN
FOR rec1 IN
SELECT