This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function JayrockChannel() | |
{ | |
this.rpc = function(call) | |
{ | |
var async = typeof(call.callback) === 'function'; | |
var xhr = newXHR(); | |
xhr.open('POST', call.url, async, this.httpUserName, this.httpPassword); | |
xhr.setRequestHeader('Content-Type', this.contentType || 'application/json; charset=utf-8'); | |
xhr.setRequestHeader('X-JSON-RPC', call.request.method); | |
if (async) xhr.onreadystatechange = function() { xhr_onreadystatechange(xhr, call.callback); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The MIT License | |
# | |
# Copyright (c) 2008, Atif Aziz | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Process Monitor | |
# | |
# Re-launches a process if it dies. | |
# | |
# Public Domain | |
# http://en.wikipedia.org/wiki/Public_domain | |
# Written by | |
# Atif Aziz, http://www.raboof.com | |
# Adapted from | |
# http://bartdesmet.net/blogs/bart/archive/2006/08/30/4366.aspx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Process Monitor | |
# | |
# Re-launches a process if it dies. | |
# | |
# Public Domain | |
# http://en.wikipedia.org/wiki/Public_domain | |
# Written by | |
# Atif Aziz, http://www.raboof.com | |
# Adapted from | |
# http://bartdesmet.net/blogs/bart/archive/2006/08/30/4366.aspx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2008, Atif Aziz. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# - Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://haacked.com/archive/2009/01/04/fun-with-named-formats-string-parsing-and-edge-cases.aspx#70316 | |
using System; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Web.UI; | |
namespace StringLib | |
{ | |
using System.Web; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://groups.google.com/group/jayrock/t/4428c08b81d43485 | |
using System; | |
using Jayrock.Json.Conversion; | |
class Program | |
{ | |
static void Main() | |
{ | |
const string json = @"{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://haacked.com/archive/2009/01/14/named-formats-redux.aspx#70485 | |
using System; | |
using System.Text; | |
using System.Web; | |
using System.Web.UI; | |
namespace StringLib | |
{ | |
public static class HenriFormatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.properties = function(obj, includeFunctions) | |
{ | |
var props = []; | |
for (var prop in obj) | |
{ | |
if (true === includeFunctions || 'function' !== typeof obj[prop]) | |
props.push(prop); | |
} | |
return props; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Imports | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.ComponentModel; | |
using System.Collections.ObjectModel; | |
#endregion | |