Skip to content

Instantly share code, notes, and snippets.

View blackknight36's full-sized avatar
💭
I may be slow to respond.

Michael blackknight36

💭
I may be slow to respond.
View GitHub Profile
@blackknight36
blackknight36 / en_SE
Created September 28, 2023 20:52 — forked from bmaupin/en_SE
en_SE locale
escape_char /
comment_char %
% This file was generated by taking the LC_TIME section from en_US and
% replacing date/time representation with that of sv_SE from the glibc
% locale sources
% (http://sourceware.org/git/?p=glibc.git;a=tree;f=localedata/locales;hb=HEAD)
% (https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html)
% This file is part of the GNU C Library and contains locale data.
@blackknight36
blackknight36 / EmailOSXCommandLine.md
Last active December 15, 2022 00:28 — forked from roubles/EmailOSXCommandLine.md
Send email from OSX Command line using gmail as SMTP

#Step 1: Update /etc/postfix/main.cf

$ sudo vim /etc/postfix/main.cf

Add the following lines, anywhere really, but preferably under the relayhost section:

relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
@blackknight36
blackknight36 / Load Balancing FTP.txt
Created November 30, 2020 16:56 — forked from erkie/Load Balancing FTP.txt
Load balancing FTP
Load Balancing FTP.
If you run an FTP server at scale, you will eventually want to load balance it. This is no mean task as FTP is a notoriously finicky protocol. Those familiar with FTP will know that it uses more than one TCP connection; the first connection is the command channel and the second is the data channel. To successfully load balance FTP, you must address both of these connections.
To further complicate matters, the data channel can be established using two methods. FTP Active or FTP Passive. For the rest of this document, I will simply use the terms active and passive to refer to these modes. First, let’s review how the command and data channels are used in FTP.
Active FTP.
When using FTP in active mode, the FTP client first connects to the server on port 21. This opens the command channel. The client authenticates itself, sets options, retrieves feature support from the server etc. The data channel is not opened until the client makes request that will result in the transfer of data from the
@blackknight36
blackknight36 / gist:c7348778a0e5bdc4853df94cca09337c
Created November 19, 2020 23:32 — forked from tsnoad/gist:2642087
SSHA password hashing. this format is used by OpenLDAP to store passwords
<?
function make_salt($salt_size=32) {
//list of possible characters from which to cerate the salt
$sea = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
//how many possible characters are there
$sea_size = strlen($sea);
$salt = "";
@blackknight36
blackknight36 / twitch_irc.md
Created April 11, 2020 18:36 — forked from hunterbridges/twitch_irc.md
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
@blackknight36
blackknight36 / building_lustre_client_rpms.md
Last active December 21, 2017 21:33 — forked from tcooper/building_lustre_client_rpms.md
Lustre Client RPM Build Process
@blackknight36
blackknight36 / tmux-cheatsheet.markdown
Created January 13, 2017 13:46 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@blackknight36
blackknight36 / pre-commit
Created May 13, 2016 20:35 — forked from fluxrad/pre-commit
A pre-commit git hook to validate puppet syntax
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.collectd.collectd</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/sbin/collectd</string>
<string>-f</string>