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
<?php | |
function array_map_eval($code, $array) | |
{ | |
$retval=array(); | |
foreach($array as $_) $retval[]=eval($code); | |
return $retval; | |
} | |
$input = array(); | |
for($i=0;$i<2;++$i) |
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
% An ad hoc, informally-specified, bug-ridden, slow implementation of half of Lisp | |
% | |
% start like: erlc erlisp.erl && rlwrap erl -noshell -s erlisp -s init stop | |
% quoting and eval are not working. | |
% one example that works: | |
% (set triple (lambda (n) (* n 3))) | |
% (triple 3) | |
% | |
% Any feedback on what I'm doing wrong or how to improve appreciated. | |
% twitter.com/metabrew |
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
#!/bin/bash | |
# Hacky 'IRCCat for twitter' (see http://github.com/RJ/irccat) | |
# Usage: ./twittercat.sh | |
# echo "my tweet" | nc -q0 localhost 9999 | |
PORT=9999 | |
USERNAME="your_twitter_name" | |
PASSWORD="your_twitter_password" | |
while [ 1 ] |
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
Music library, search engine and scanner. | |
Implements the JSON-RPC musiclibrary protocol as outlined below. | |
NB: "id" field would be unique to each call (increment int, or use guid) | |
ADDING/REMOVING TRACKS FROM THE INDEX | |
------------------------------------- | |
>>> (no "id", thus no response sent) | |
{ |
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
#!/usr/bin/ruby | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
require 'ruby-growl' | |
require "getopt/long" | |
opt = Getopt::Long.getopts( |
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
%% | |
%% Simple pool for gen_servers that only use :call | |
%% | |
-module(gen_server_call_pool). | |
-behaviour(gen_server). | |
%% -------------------------------------------------------------------- | |
%% External exports | |
-export([start_link/3, stats/1]). |
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
% Check some stuff, write the .rel file, generate boot scripts and relup, make tar | |
-module(release_helper). | |
-export([go/1]). | |
-define(RELAPPS, [ kernel, | |
stdlib, | |
sasl, | |
crypto, | |
ssl, | |
inets, |
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
* Which browsers does it work in? | |
** We've tested in modern versions of Firefox, Chrome and Safari. It currently doesn't work in IE. | |
We plan to improve browser support in future. | |
* Does IRCCloud act as a BNC/bouncer and stay connected when I go offline? | |
** Yes it does - you will stay connected to IRC even if you shutdown your computer or log out of IRCCloud.com | |
This means when you come back, you'll be able to see what happened on IRC whilst you were away. | |
* What will it cost? | |
** Free currently, will roll out monthly subscription as the beta progresses. |
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
%% | |
%% Simple pool for gen_servers that only use :call | |
%% @author RJ <[email protected]> | |
%% | |
-module(gen_server_call_pool). | |
-behaviour(gen_server). | |
-include("irc.hrl"). | |
%% -------------------------------------------------------------------- |
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
-module(utf8test).¬ | |
-compile(export_all).¬ | |
¬ | |
¬ | |
b2l(B) when is_binary(B) ->¬ | |
lists:reverse(b2l(B,[])).¬ | |
¬ | |
¬ | |
b2l(<<>>, Acc) -> Acc;¬ | |
b2l(<<Char/utf8,Rest/binary>>, Acc) ->¬ |
OlderNewer