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
<?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/collectd/sbin/collectd</string>
<string>-f</string>
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active November 7, 2024 12:23
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@tsnoad
tsnoad / gist:2642087
Created May 9, 2012 05:25
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 = "";
/* Merge sort in C */
#include<stdio.h>
#include<stdlib.h>
// Function to Merge Arrays L and R into A.
// lefCount = number of elements in L
// rightCount = number of elements in R.
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;
#!/usr/bin/perl
use Cwd;
use File::Path;
my $tree = $ARGV[0];
sub saw ($) {
my($leaf) = @_;
my $cwd = getcwd;
@grendell
grendell / 1. explanation
Created May 17, 2015 07:43
Axiom Verge Cheat System Explanation
Any password that begins with the letters AXIO will be treated as a cheat code.
This is how the game evaluates cheat codes.
1. Map the remaining eight characters to an integer value.
0 - 9 maps to 0 - 9 and A - Z maps to 10 - 35.
2. Multiply each value with a power of 36, determined by position,
and take the sum of those calculations.
x = 36^7 * v0 + 36^6 * v1 + 36^5 * v2 + 36^4 * v3 +
36^3 * v4 + 36^2 * v5 + 36^1 * v6 + 36^0 * v7
@hunterbridges
hunterbridges / twitch_irc.md
Last active October 5, 2024 18:09
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";
@erkie
erkie / Load Balancing FTP.txt
Created January 25, 2020 22:07
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