Skip to content

Instantly share code, notes, and snippets.

View uuf6429's full-sized avatar
🇦🇹

Christian Sciberras uuf6429

🇦🇹
View GitHub Profile
@uuf6429
uuf6429 / ssh-protocol-handler.reg
Created September 1, 2018 17:40
SSH Protocol Handler (opens ssh urls in cmd)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ssh]
@="URL:SSH Protocol"
"EditFlags"=dword:00000002
"FriendlyTypeName"="@ieframe.dll,-907"
"URL Protocol"=""
"BrowserFlags"=dword:00000008
[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
<?php
if ($argc !== 2) {
die('File to highlight was expected as first argument.');
}
$replace = [
// base styles
'EMER' => ["\e[45;30m", " \e[0m "],
'ALRT' => ["\e[43;30m", " \e[0m "],
@uuf6429
uuf6429 / titlescroller.js
Created January 8, 2017 03:41
Title Scroller (create bookmarlet with: http://mrcoles.com/bookmarklet/)
(function () {
var options = {
textScrollInterval: 400,
textPrefix: "\u25B6 ",
textReplace: /\u25B6\s?/g,
textSpace: "\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0"
};
var isTitleChanging = false,
sourceTitle = document.title.replace(options.textReplace, ""),
@uuf6429
uuf6429 / SyncWpPlugins.php
Created April 5, 2014 12:46
Synchronizes a set of wordpress plugins with several wordpress installations (great for testing a plugin across different wordpress versions).
<?php
try {
$srcPluginPattern = 'C:\Users\Christian\Documents\GitHub\WP-*';
$dstWpSitePattern = 'C:/wamp/www/wordpress-*/wp-content/plugins/';
if(!isset($argv))throw new Exception('Program must be run through CLI');
function deleteDir($path) {
@uuf6429
uuf6429 / postmortem.php
Last active December 24, 2015 00:49
PHP Post-Mortem Tool
<?php
function on_shutdown(){
global $php_errormsg;
echo "<!--\n";
echo "\n\tHeaders Sent:";
$file = $line = null;
headers_sent($file, $line);
echo "\n\t\t$file: $line";
echo "\n\tLast Error:";