Skip to content

Instantly share code, notes, and snippets.

@Oobert
Oobert / gist:d218c1d8bbbe41ff4138
Created April 27, 2015 18:25
Hapijs reverse proxy
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({
host: '45.55.234.151',
port: 80
});
@Oobert
Oobert / gist:bc7311d4242bd64b24d5
Created February 23, 2015 19:19
meetup.com raffle page
<html>
<head>
</head>
<body>
<div>And the winnder is <span id='winner'></span>!!!!</div>
<br/>
<br/>
var routConfig = {
cache: { expiresIn: 5000 },
handler: function (request, reply) {
return reply({ name: 'John' });
}
cors: true
};
server.route({ method: 'GET', path: '/somepath', config: routConfig });
@Oobert
Oobert / gist:0de8a2a41ead78eedabc
Created December 9, 2014 16:33
Page breaks with CSS
.page-breaker {
display: block;
clear: both;
page-break-after: always;
}
@Oobert
Oobert / gist:d94e2b3e4c7979e65776
Last active January 22, 2016 17:47
Hitbot #devmke commands
11:51 <pushbot> <Project Key>-<Issue ID> - Displays information about the JIRA ticket (if it exists)
11:51 <pushbot> <anything> - pushbot will take note of what you said. This is unique per name/room
11:51 <pushbot> <name>++
11:51 <pushbot> <name>--
11:51 <pushbot> <user>: 1/10 - rate the comment 1/10
11:51 <pushbot> <user>: s/find/replace/modifier - pushbot will apply a regex to the last thing the user said and output the result
11:51 <pushbot> Events:
11:51 <pushbot> best/worst rating - displays top/bottom X users
11:51 <pushbot> botsnack - give the bot a food
11:51 <pushbot> deal with it - display a "deal with it" gif
@Oobert
Oobert / gist:0f3f3f28c02b473ab651
Created October 28, 2014 18:41
Lat/Long to x,y and x,y and Lat/Long
function Adjust(X,Y,x,y,z,w)
{
var offset=268435456; //(half of the earth circumference's in pixels at zoom level 21)
var radius=offset/Math.PI;
function LToX(x)
{
return Math.round(offset+radius*x*Math.PI/180);
}
function LToY(y)
{

Did you know chat rooms are still a thing? They didn't die with AOL. IRC has been around since before the world wide web. IRC has been and continues to be popular for technical communities. There are channels for many frameworks, languages, and conferences.

That Conference's offical channel is #ThatConference on the FreeNode Network. To join us, just go here: https://kiwiirc.com/client/irc.freenode.net/thatconference/, type in a nick and hit start.

But what is it?

IRC stands for Internet Relay Chat. IRC is an open standard. No one person or company "owns" it. An IRC network is a decentralised cluster of servers. Servers are typically disturbed around the world. IRC clients connects to one of the servers in the cluster and joins channels (chat rooms) to communicate. Users send messages to each other in channels, send private messages to others users, send files, and create new channels.

Let's get started

@Oobert
Oobert / gist:8ae57877ceebb35a4b89
Last active August 29, 2015 14:00
C# simple object factory
public static class Factory
{
private static Dictionary<Type, Object> _typeLookup = new Dictionary<Type, object>();
/// <summary>
/// Clears the dispener.
/// </summary>
public static void ClearDispener()
{
_typeLookup.Clear();
@Oobert
Oobert / gist:8561325
Last active January 4, 2016 03:19
Start of a FSM in JS. Because why not?
var fsm = function (states) {
this.current;
this.states = states;
};
fsm.prototype.changeStateTo = function (newState, obj) {
if (this.current &&
this.current.unload) {
this.current.unload();
}
#meter {
width: 0%;
height: 15px;
margin: 2px 0;
background: green;
-webkit-transition: width .05s;
}