Skip to content

Instantly share code, notes, and snippets.

@rfox90
rfox90 / clock.cgi
Created October 19, 2015 02:55
Simple example of an lametric endpoint in perl.
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use JSON;
my $json = JSON->new->pretty->allow_nonref;
my $q = CGI->new;
@rfox90
rfox90 / Package.js
Created July 30, 2015 23:34
Using globs in Package.js for local application packages
Package.describe({
summary: 'test',
name: 'ahref:test',
version: '0.0.1'
});
var packages = [];
var globApi = Npm.require('glob');
var path = Npm.require('path');
@rfox90
rfox90 / recover-sharex.pl
Created July 8, 2015 01:24
Sharex Recovery
#!/usr/bin/perl -w
#I use sharex to form my own version of imgur, files get uploaded with a random string on my domain
#
#I accidentally deleted the webserver copy, so used the local cache to re-create it with this
use XML::Simple;
use Data::Dumper;
use File::Copy;
use File::Find::Rule;