Skip to content

Instantly share code, notes, and snippets.

@Dethnull
Dethnull / IPSanity.php
Created October 23, 2018 16:32
IPSanity
<?php
/**
* Author: Derek Ellison
* Date: 5/15/15
*
* Copyright (c) 2015 Derek Ellison
* 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 the Software, and
@Dethnull
Dethnull / install-comodo-ssl-cert-for-nginx.rst
Created August 11, 2016 22:25 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@Dethnull
Dethnull / IPSanity.php
Created May 14, 2015 21:51
This is a helper library to deal with IPv4 and IPv6 address. At the moment it only checks if the passed IP is in the subnet of some predefined IP's
<?php
/**
* Author: Derek Ellison
* Date: 5/15/15
*
* Copyright (c) 2015 Derek Ellison
* 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 the Software, and
@Dethnull
Dethnull / Portable-utf8
Created March 18, 2014 03:36
This is a fork of the Portable-utf8 library found here, http://pageconfig.com/post/portable-utf8. I've fixed some typos and also added a function called utf8_whitespace_table which returns an array of whitespaces as defined here, http://www.bogofilter.org/pipermail/bogofilter/2003-March/001889.html
<?php
/**
* Portable UTF-8
* Lightweight Library for Unicode Handling in PHP
* @details http://pageconfig.com/post/portable-utf8
* @demo http://pageconfig.com/post/portable-utf-8-demo
*
* @version 1.3
@Dethnull
Dethnull / ConsoleInputParse.java
Created February 26, 2013 09:07
Here is an example answer to my own question on GitHub, http://stackoverflow.com/questions/15081892/javafx-text-multi-word-colorization. This can be extended to do pretty much anything, but it was recommended to use CellFactory to do the same thing. Example of that is here, https://gist.github.com/jewelsea/5036908
public class ConsoleInputParse {
private String[] wordList = {};
public ConsoleInputParse() {}
public FlowPane parseInputToArray(String input) {
wordList = input.trim().split("[ ]+");
return colorize();