Skip to content

Instantly share code, notes, and snippets.

Avatar

Revlin John Revlin

View GitHub Profile
@Revlin
Revlin / vrml.pm
Last active October 3, 2016 19:09
vrml.pm
View vrml.pm
{
package vrml;
require Exporter;
@ISA = ('Exporter');
@EXPORT = (
DEF, USE,
Group, Transform,
Appearance, Material,
Shape, Cone, Cylinder
);
View build_mysql51.sh
#!/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'
View build_mysql51.sh
#!/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)
View test-mojo.pl
#!/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";
View color-conversion-algorithms.js
/**
* 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
View LICENSE.txt
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
View LICENSE.txt
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
View mojo-lessons.pl
#!/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;