Skip to content

Instantly share code, notes, and snippets.

View NeilHanlon's full-sized avatar

Neil Hanlon NeilHanlon

View GitHub Profile
(function(){
var oldPrint = window.print;
var slice = Array.prototype.slice;
window.print = function () {
if (typeof window.onbeforeprint === "function") {
window.onbeforeprint.apply(this, slice.call(arguments));
}
oldPrint.apply(this, slice.call(arguments));
if (typeof window.onafterprint === "function") {
@NeilHanlon
NeilHanlon / compact_print_r.php
Created October 30, 2015 18:04
Prints compacted human-readable information about a variable. Follows nearly the same behavior as PHP's built-in function print_r with some improvements that reduce unnecessary indentation and lines.
<?php
/**
* Prints compacted human-readable information about a variable. Follows nearly
* the same behavior as PHP's built-in function print_r with some improvements.
* Namely, it reduces the output indentation for nested arrays and object,
* removes lines with a single parenthesis (open or close), and returns string
* representating boolean ("true" versus "false") when expression is a scalar
* boolean. Requires PHP 5.4 or greater due to shorthand array syntax.
*
@NeilHanlon
NeilHanlon / powerline-test.sh
Created October 14, 2015 05:37 — forked from gdetrez/powerline-test.sh
Powerine font test
#!/bin/bash
echo -e "Powerline glyphs:\n\
Code points Glyphe Description Old code point
U+E0A0 \xee\x82\xa0 Version control branch (U+2B60 \xe2\xad\xa0 )\n\
U+E0A1 \xee\x82\xa1 LN (line) symbol (U+2B61 \xe2\xad\xa1 )\n\
U+E0A2 \xee\x82\xa2 Closed padlock (U+2B64 \xe2\xad\xa4 )\n\
U+E0B0 \xee\x82\xb0 Rightwards black arrowhead (U+2B80 \xe2\xae\x80 )\n\
U+E0B1 \xee\x82\xb1 Rightwards arrowhead (U+2B81 \xe2\xae\x81 )\n\
U+E0B2 \xee\x82\xb2 Leftwards black arrowhead (U+2B82 \xe2\xae\x82 )\n\
POST /ssls
params { domain: example.com,
email_address: admin@example.com,
billing_customerid: WHMCS user ID,
billing_serviceid: WHMCS service ID (i.e, hosting),
billing_addonid: WHMCS addon ID under above service ID }
returns { status, message, alphassl_orderid }
GET /ssls/{alphassl_orderid}
POST /ssls
params { domain: example.com,
email_address: admin@example.com,
billing_customerid: WHMCS user ID,
billing_serviceid: WHMCS service ID (i.e, hosting),
billing_addonid: WHMCS addon ID under above service ID }
returns { status, message, alphassl_orderid }
GET /ssls/{alphassl_orderid}
POST /ssls
params { domain: example.com,
email_address: admin@example.com,
billing_customerid: WHMCS user ID,
billing_serviceid: WHMCS service ID (i.e, hosting),
billing_addonid: WHMCS addon ID under above service ID }
returns { status, message, alphassl_orderid }
GET /ssls/{alphassl_orderid}
POST /ssls
params { domain: example.com,
email_address: admin@example.com,
billing_customerid: WHMCS user ID,
billing_serviceid: WHMCS service ID (i.e, hosting),
billing_addonid: WHMCS addon ID under above service ID }
returns { status, message, alphassl_orderid }
GET /ssls/{domain}
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO