Skip to content

Instantly share code, notes, and snippets.

View robhammond's full-sized avatar

Rob Hammond robhammond

View GitHub Profile
@robhammond
robhammond / redirect.pl
Last active February 16, 2018 15:43 — forked from Logioniz/redirect.pl
Redirect from http to https with mojolicious
#!/usr/bin/perl
# To run need listen two ports: 80, 443
# sudo morbo 12.pl -l https://*:443?cert%3D%2Fhome%2Flogioniz%2Fcert%2Fserver.crt%26key%3D%2Fhome%2Flogioniz%2Fcert%2Fserver.key%26verify%3D0x00 -l http://*:80
# go to url in browser http://your_ip/qwe/asd
use Mojo::Base -strict;
use Mojolicious::Lite;
@robhammond
robhammond / 0_reuse_code.js
Created July 30, 2014 16:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000