Skip to content

Instantly share code, notes, and snippets.

View frdmn's full-sized avatar
🦀

Jonas Friedmann frdmn

🦀
View GitHub Profile
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active May 3, 2024 14:20
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@mietzen
mietzen / macos-bitwarden-cli-ssh.md
Last active April 30, 2024 08:52
How to use use Bitwarden CLI for SSH-Keys in macOS

How to use use Bitwarden CLI for SSH-Keys in macOS

If you want to use Touch ID have a look at: How to use use Bitwarden CLI with macOS Touch ID

Wirtten and tested on macOS Ventura

Add SSH-Keys to Bitwarden

Before you can use Bitwarden CLI for your SSH private keys you have to add them to your Bitwarden account. Just create a normal login. The name, username and URI fields doesn't matter for my functions.

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@comp500
comp500 / fabricserversidemods.md
Last active April 15, 2024 20:13
Useful Fabric server side mods
@viegelinsch
viegelinsch / fix_munin_dynazoom.md
Last active February 18, 2024 09:34
fix no graphic in munin dynazoom

You have something like "[WARNING] Could not draw graph "/var/lib/munin/cgi-tmp/munin-cgi-graph/" in your /var/log/munin/munin-cgi-graph.log ???

Check the directory permissions!

ls -l /var/lib/munin/cgi-tmp/

shows something like

drwxr-xr-x 3 munin www-data 4,0K Mär 29  2013 munin-cgi-graph/
@ntopulos
ntopulos / Multiple PHP versions on Ubuntu 16.04.md
Created June 10, 2016 15:00
Steps to get multiple versions of PHP running alongside on separate Apache virtual hosts using phpfarm

Multiple PHP versions on Ubuntu 16.04

Steps to get multiple versions of PHP running alongside on separate Apache virtual hosts using phpfarm.
The guide uses the example of PHP v5.4.45 and v7.0.7, but installation of any version and any number of versions will be done this same way.

Prerequisites

Update the machine:

@malt3
malt3 / edu.md
Last active December 13, 2023 19:57
Edu Vorteile RUB

Studentenvorteile (Vor allem für Informatikstudenten)

Software Pakete

@klange
klange / _.md
Last active December 2, 2023 20:36
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
@reetp
reetp / Readme.md
Last active November 23, 2023 00:19
Debugging

Rocket.Chat - Asking for help

For users with issues with Rocket.Chat please do yourselves a few favours before asking for help.

Before you start.

First, you must ALWAYS test on the latest version of Rocket.Chat - you can also try https://open.rocket.chat which always runs development versions. A large amount of issues are fixed with an update.

You are going to need to provide some basic information if you want a chance of resolving your issue.

@dwilkie
dwilkie / ubuntu_unattended_upgrades_gmail.markdown
Created July 2, 2015 10:28
Setup unattended upgrades on Ubuntu with Gmail

Install the unattended-upgrades package

$ sudo apt-get install unattended-upgrades 

Edit the periodic configuration

$ sudo nano /etc/apt/apt.conf.d/10periodic