Skip to content

Instantly share code, notes, and snippets.

@vorstrelok
vorstrelok / keepassxc_pam.fish
Created February 2, 2021 15:20
KeePassXC PAM loing manager integration
#!/usr/bin/fish --private
# !!!Security note!!!
# This will give any process running as your user access to your password while
# key has not expired (2 minutes or revocation by service, whatever comes first)
# Proper solution would probably be writing PAM module and transfering key
# straight to KeePassXC's own keyring
set userid (/usr/bin/id -u "$PAM_USER")
if test "$PAM_TYPE" = 'auth'
@ak--47
ak--47 / productSchool.js
Last active April 17, 2025 11:28
💾 data loader for the Product Analytics Certification
//PUT YOUR MIXPANEL TOKEN AND SECRET BELOW:
const credentials = {
"token": "your-mixpanel-token-here",
"secret": "your-mixpanel-secret-here"
}
/*
@moonraker46
moonraker46 / gist:7956d06b97979ce8a34538c503494331
Created April 15, 2022 05:24
OpenWRT config 1und1 Glasfaser (carrier Deutsche Telekom)
# /etc/config/network
# OpenWRT router (physical or virtual) is behind a Telekom Glasfaser Modem 2
config interface 'WAN'
option proto 'pppoe'
option ipv6 'auto'
option device 'eth1.7'
option username '1und1/[email protected]'
option password 'xxxxxxxx'
option metric '1'
@mohokh67
mohokh67 / vscode-settings.md
Last active April 17, 2025 11:25
Install italic and customizable font for vscode

Link to Youtube video: https://youtu.be/QxcRmsGHcWY

Manual steps:

  • Download and install Victor Mono font
  • Update VSCode setting as bellow:
    • font size, line height and font weight are optional and you can update them as you prefer
{
  "editor.fontSize": 13,
  "editor.lineHeight": 24,
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@ellsies
ellsies / Crossover.sh
Last active April 17, 2025 11:15
Crackover (Complete free version of crossover)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 17, 2025 11:00
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@DomPizzie
DomPizzie / README-Template.md
Last active April 17, 2025 10:28
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started