Skip to content

Instantly share code, notes, and snippets.

View fwaggle's full-sized avatar
👾
:q!

James Fraser fwaggle

👾
:q!
View GitHub Profile
@fwaggle
fwaggle / 1625.html
Created January 11, 2016 07:54
xkcd #1625
<html>
<a href="javascript:var xkcd={
'debate': 'Dance-off',
'self driving': 'Uncontrollably swerving',
'self-driving': 'Uncontrollably swerving',
'poll': 'Psychic reading',
'candidate': 'Airbender',
'drone': 'Dog',
'vows to': 'probably wont',
'at large': 'very large',

Keybase proof

I hereby claim:

  • I am fwaggle on github.
  • I am fwaggle (https://keybase.io/fwaggle) on keybase.
  • I have a public key whose fingerprint is 158A 7731 8324 4B28 6772 24A2 C2B7 9F9C F3B8 DC6A

To claim this, I am signing this object:

@fwaggle
fwaggle / lazy-temp-chans original
Created April 19, 2011 04:32
Original proposal for lazy (or semi-persistent) temporary channels.
Split my pull request to only deal with the first half of this glorious plan, because the second half is ripe with logical issues that need fixing. I decided to retain the original proposal text though, in case I wanted to know what I was smoking at the time.
Here it is:
I'd like some feedback on this idea please. :D
Basically I'm tracking the timestamp since each channel was last used, accessible via Ice*. This first feature allows not only the second, but it also allows server admins to do things like find channels that haven't been used in ages and remove them from the tree.
The second feature allows a server admin to set temporary channels to hang around a bit after the last user leaves. It sounds cracked out, but hear me out. On my public servers I've got some really faithful groups who come back day after day and set up their channels again... obviously from a commercial host standpoint I'd prefer to convert these people into paying clients, but I'm not too fussed - it's just awesome they're using M
@fwaggle
fwaggle / "channel last used" v2
Created March 11, 2011 16:44
Allows temporary channels to hang around for an approximate amount of time (defaults to 10s in this example, obviously default would be zero, and i haven't checked the meta config stuff works it was a crappy copy+paste). i'm aware it probably shouldn't be
diff -ur ../old/src/Channel.cpp ./src/Channel.cpp
--- ../old/src/Channel.cpp 2011-03-10 00:12:59.000000000 -0500
+++ ./src/Channel.cpp 2011-03-11 10:30:14.000000000 -0500
@@ -47,6 +47,9 @@
cParent = qobject_cast<Channel *>(p);
if (cParent)
cParent->addChannel(this);
+
+ iLastUsed = QDateTime::currentDateTime().toTime_t();
+
diff -ur ../old/src/Channel.cpp src/Channel.cpp
--- ../old/src/Channel.cpp 2011-03-10 00:12:59.000000000 -0500
+++ src/Channel.cpp 2011-03-10 00:47:18.000000000 -0500
@@ -47,6 +47,9 @@
cParent = qobject_cast<Channel *>(p);
if (cParent)
cParent->addChannel(this);
+
+ iLastUsed = QDateTime::currentDateTime().toTime_t();
+