Skip to content

Instantly share code, notes, and snippets.

View wopfel's full-sized avatar

Bernd Arnold wopfel

  • Bavaria, Germany
View GitHub Profile
# If Debian 11 is ran on a LXC container (Proxmox), SSH login and sudo actions can be slow
# Check if in /var/log/auth.log the following messages
Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
-> Run systemctl mask systemd-logind
-> Run pam-auth-update (and deselect Register user sessions in the systemd control group hierarchy)
@mrskug
mrskug / grml-install.sh
Last active March 27, 2024 18:58
simple Grml zsh config installer for Ubuntu/debian (The same one used in the Arch installer)
#!/usr/bin/env bash
pkgver=0.19.6
pkgdir=/tmp/grml/
echo "--** Installing dependencies **--"
apt update
apt install zsh coreutils grep sed procps txt2tags build-essential
echo "--** Creating pkgdir **--"
@mountbatt
mountbatt / ZOE-Widget.js
Last active May 5, 2024 18:58
Scriptable iOS widget that displays the status of your Renault ZOE (or Megane, Dacia Spring) on your iPhone and iPad.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: light-gray; icon-glyph: car;
// version 2024-04-19
// latest changes:
// new kameron api key
// added language strings so you can translate it by yourself!
// add your my-renault account data:
// let myRenaultUser = "user" // email
@geek-at
geek-at / trash.sh
Created August 13, 2020 07:27
The script used to trash a banking phishing site
#!/bin/bash
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
@mhzawadi
mhzawadi / pi_version.sh
Last active July 16, 2019 15:14
Get the Pi model
#!/bin/sh
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
cpuinfo=`cat /proc/cpuinfo | grep "Revision"|awk -F': ' '{printf $2}'`
model=`cat /sys/firmware/devicetree/base/model`
case ${cpuinfo} in
"0002" )
echo "Revision : 0002 (Model B Rev 1, 256MB)" ;;
"0003" )
---
- name: Setup Icinga2 Client
hosts: all
vars:
icinga2_pki_path: /var/lib/icinga2/certs
icinga2_master: "icinga-master.fqdn"
icinga2_cn: "{{ inventory_hostname }}"
icinga2_zone: "{{ inventory_hostname }}"
# connection direction: master <- client
icinga2_endpoint: "icinga-satellite-or-master.fqdn,icinga-satellite-or-master.fqdn,5665"
@harryawk
harryawk / delete_tweets_and_replies.py
Last active May 31, 2023 03:52
Script to delete all your tweets and replies
"""
This script is using python-twitter SDK (https://github.com/bear/python-twitter)
All key and secret strings can be generated by creating an app in https://apps.twitter.com/
"""
import twitter
consumer_key = ''
consumer_secret = ''
access_token_key = ''
@rolfn
rolfn / restic.md
Last active May 1, 2024 13:49
Backup auf Cloud-Speicher mit »restic«

Automatische Backups auf Online-Speicher mit »Restic«

Das Programm »Restic« ist ein modernes Backup-Programm, welches als Speicherort sowohl lokale Verzeichnisse als auch per Netzwerk erreichbare Speicher (Online-Speicher) nutzen kann. Der Autor von »Restic« zeigt in anschaulicher Weise in zwei Videos viele Details zur Arbeitsweise seines Programms: »FOSDEM 2015« (2015-01-28) und »CCCCologne« (2016-01-29).

Im Folgenden soll gezeigt werden, wie man unter Linux automatische Backups mit »Restic« einrichten kann. Als Speicherort wird per WebDAV-Protokoll erreichbarer Online-Speicher genutzt. Sinngemäß können die Hinweise aber auch auf andere Netzwerkprotokolle übertragen werden. Getestet wurde unter »openSUSE« und »Linux Mint« (»Ubuntu«), wobei aber auch alle anderen systemd-basierten Linux-Distributionen in derselben Art oder mit geringfügigen Änderungen geeignet sind.

Install

@Phaeilo
Phaeilo / archvm.sh
Last active May 24, 2022 19:55
Archlinux VM automated installation script.
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Philip Huppert
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j