Skip to content

Instantly share code, notes, and snippets.

View Revlin's full-sized avatar

Revlin John Revlin

View GitHub Profile
@Revlin
Revlin / vrml.pm
Last active October 3, 2016 19:09
vrml.pm
{
package vrml;
require Exporter;
@ISA = ('Exporter');
@EXPORT = (
DEF, USE,
Group, Transform,
Appearance, Material,
Shape, Cone, Cylinder
);
#!/bin/bash
set -e
sudo apt-get install build-essential libncurses5-dev libedit-dev libreadline-dev libssl-dev
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.72.tar.gz
tar -zxf mysql-5.1.72.tar.gz
cd mysql-5.1.72
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control' '--with-readline'
#!/bin/bash
set -e
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make
@Revlin
Revlin / test-mojo.pl
Last active August 29, 2015 13:56
Mojolicious Test Server - Pingable server that prints out Request Header + Body (if any)
#!/usr/bin/perl
use Mojolicious::Lite;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
any '/' => sub {
my $self = shift;
my $request = '';
$request .= "URL: ". $self->req->url ."\n\t";
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@Revlin
Revlin / LICENSE.txt
Last active December 24, 2015 18:59 — forked from 140bytes/LICENSE.txt
rGate
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Revlin
Revlin / LICENSE.txt
Last active December 24, 2015 07:49 — forked from 140bytes/LICENSE.txt
aFunction
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Revlin
Revlin / mojo-lessons.pl
Last active December 14, 2015 22:08
The following is some really basic explorations of the capabilities of Mojolicious::Lite -- I will update as I find out more
#!/usr/bin/perl -wT
use Mojolicious::Lite;
# The following is some really basic explorations of the capabilities of
# Mojolicious::Lite -- I will update as I find out more and a living (or
# more alive) version of this script is available on gist @
# https://gist.github.com/Revlin/5155856
my $app = app;
my $version = Mojolicious->VERSION;