Skip to content

Instantly share code, notes, and snippets.

View lukebrady's full-sized avatar
Coffee Time

Luke Brady lukebrady

Coffee Time
View GitHub Profile
@albertomolina
albertomolina / iSCSI_cheatsheet.md
Last active November 13, 2024 00:31
iSCSI cheatsheet

iSCSI server with tgt

apt install tgt

Manual configuration of targets

Create a new target named "target1":

tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2020-01.es.tinaja:target1

Delete a specific target:

@cmer
cmer / haproxy.cfg
Last active October 8, 2025 18:11
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active October 22, 2025 19:48
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:

@rxaviers
rxaviers / gist:7360908
Last active November 17, 2025 20:01
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@cutthroat
cutthroat / pickle_list.c
Created December 21, 2010 00:40
basic linked list serialization
#include <stdlib.h>
#include <stdio.h>
/* list in core */
/* node in our linked list */
struct node {
struct node *link;
long data;