Skip to content

Instantly share code, notes, and snippets.

View salathe's full-sized avatar
🐮
🔥

Peter Cowburn salathe

🐮
🔥
  • Akamai Technologies
  • Edinburgh, Scotland
View GitHub Profile
@creationix
creationix / output.log
Created May 8, 2013 22:02
Working version of generator async code sample. Using node from https://github.com/andywingo/node/tree/v8-3.19
tim@touchsmart:~/Code$ nvm use v0.11.2-generators
Now using node v0.11.2-generators
tim@touchsmart:~/Code$ node --harmony testgen.js
<Buffer 76 61 72 20 66 73 20 3d 20 72 65 71 75 69 72 65 28 27 66 73 27 29 3b 0a 66 75 6e 63 74 69 6f 6e 20 72 65 61 64 46 69 6c 65 28 70 61 74 68 2c 20 65 6e 63 ...>
Sleeping for 2000ms...
Done
@hjr3
hjr3 / PushMessage.php
Created January 30, 2012 21:32
A simple irc async push message script for Phergie IRC Bot
<?php
class Phergie_Plugin_PushMessage extends Phergie_Plugin_Cron
{
public function onLoad()
{
$settings = $this->config['push_message.listen'];
foreach ($settings as $listen) {
$host = $listen['host'];
@larscwallin
larscwallin / gist:1161995
Created August 22, 2011 09:18
JsonRPCProxy for ExtJS
/*
Orginally by cginzel at the Sencha Forums
http://www.sencha.com/forum/member.php?20865-cginzel
I'm playing with NodeJS and Connect which has an JSONRPC provider and so I managed to coble this proxy and reader together that I was able to successfully use to retrieve data into a grid. But I'm moving onto building an Ext.Direct provider instead so it'll be easier to build out the GUI. But for posterity's sake, I thought I'd post this code here just in case anyone else might find it useful.
I don't intend to support it, so use it at your own risk!
@hakre
hakre / xml-books.php
Created July 21, 2011 14:08
XMLReader based parser in form of an iterator and filteriterator
<?php
/*
XMLReader based parser in form of an iterator and filteriterator
Author: hakre <hakre.wordpress.com>
Copyright (c) 2011, some rights reserved
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@josiahcarlson
josiahcarlson / redis_simple_chat.py
Created June 24, 2011 22:07
A way of implementing a poll-based chat inside Redis
'''
redis_simple_chat.py
Written June 24, 2011 by Josiah Carlson
Released under the GNU GPL v2
available: http://www.gnu.org/licenses/gpl-2.0.html
Other licenses may be available upon request.
@salathe
salathe / json.php
Created June 21, 2011 09:33 — forked from alkavan/json.php
JSON Helper for Kohana v3
<?php defined('SYSPATH') or die('No direct script access.');
/**
* JSON helper class
*
* Examples:
* $j = JSON::decode('{"Organization": "Kohana"}'); // Good
* $j = JSON::decode("{'Organization': 'Kohana'}"); // Invalid
* $j = JSON::decode('{"Organization": "Kohana"}', NULL, 1); // depth stack exceeded
*
* @package Kohana
@cowboy
cowboy / HEY-YOU.md
Last active April 9, 2024 15:54
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.