Skip to content

Instantly share code, notes, and snippets.

View beardcoder's full-sized avatar
👾
Explore the universe

Markus beardcoder

👾
Explore the universe
View GitHub Profile
#!/bin/bash
# ----------------------------------------------------------------------------------------------------------------------
# Debian/Coolify v4 – Autonomous Maintenance (v4)
# ----------------------------------------------------------------------------------------------------------------------
# Fully headless, production-safe maintenance for Debian (11/12+) hosts running Coolify v4 (Docker).
#
# Key features
# - Idempotent, single-instance via flock
# - Non-interactive apt upgrades + autoremove/clean (needrestart auto)
# - Journald limits, logrotate, Docker json-log caps
#!/usr/bin/env rust-script
//! ```cargo
//! [dependencies]
//! ```
use std::env;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::time::{Duration, Instant};
@beardcoder
beardcoder / Description.md
Created September 27, 2025 19:13
Passwordless sudo on macos

sudo_pw - Passwordless Sudo for macOS using Keychain

A secure and convenient wrapper for sudo commands on macOS that eliminates repetitive password prompts by leveraging the macOS Keychain system for encrypted password storage.

🚀 Features

  • 🔐 Secure: Uses macOS Keychain for encrypted password storage (same security level as Safari passwords)
  • ⚡ Fast: No more repetitive password prompts - authenticate once, use everywhere
  • 🛡️ Safe: Intelligent fallback to interactive prompts when keychain is unavailable
  • 🔄 Smart: Maintains sudo session with automatic keepalive mechanism
@beardcoder
beardcoder / 01_before.js
Last active January 12, 2021 19:12
Mapping Pattern
export const useColorName = (color: string): any => {
const additionalColorClassNames = []
const additionalTextColorClassNames = []
switch (color) {
case 'primary':
additionalColorClassNames.push('bg-primary border-primary-light')
break
case 'secondary':
additionalColorClassNames.push('bg-secondary border-secondary-light')
break
@beardcoder
beardcoder / workspace.sh
Last active December 27, 2020 21:33
Allow switch window over all workspaces
gsettings set org.gnome.shell.window-switcher current-workspace-only false
gsettings set org.gnome.shell.app-switcher current-workspace-only false
@beardcoder
beardcoder / store.ts
Last active March 10, 2020 15:04
Store Pattern für vuex store
import { ActionTree, MutationTree } from '~/node_modules/vuex';
export const apiRoutes = {
requests: '/api/requests',
}
export interface RequestState {
requests: [] | null;
}
@beardcoder
beardcoder / MyComponent.vue
Last active February 9, 2022 08:58
Synced via Snip
<template>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
@Component
export default class MyComponent extends Vue {
@Prop({ default: null }) items: string[];
@beardcoder
beardcoder / auth.ts
Created July 19, 2019 08:22 — forked from AndreaMinato/auth.ts
Typescript Vuex Module
import axios, { AxiosRequestConfig } from "axios";
import router from "@/router"; //shortcut to src
import { Module } from "vuex";
const authModule: Module<any, any> = {
state: {
loggedIn: false,
loginError: null,
username: null
@beardcoder
beardcoder / apiDummy.js
Created July 17, 2019 07:30
Sample api file for js api calls
export default {
create(payload: any) {
},
show(id: number) {
},
index() {
},
@beardcoder
beardcoder / Docker-Proxy.nginx.conf
Created May 5, 2019 09:39
Docker Proxy settings for ISPconfig with nginx
location / {
proxy_pass http://localhost:2080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
access_log off;
log_not_found off;