This file contains hidden or 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 | |
require 'autoload.php'; | |
$redis = new Predis\Client('tcp://127.0.0.1', 'dev'); | |
// *** NOTE *** Lua's unpack() has a limit on the size of the table imposed by | |
// the number of Lua stack slots that a C function can use. This value is defined | |
// by LUAI_MAXCSTACK in luaconf.h and for Redis is set to 8000, which translates | |
// to an hash of 4000 elements since HGETALL returns a list that interleaves field |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Util | |
{ | |
public static class Enums | |
{ | |
#region Parse Methods | |
/// <summary> |
This file contains hidden or 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 | |
shopt -s extglob #Enables extglob | |
# OS: OSX 10.6.7 and Ubuntu 11.04 | |
# Mono: 2.10.1 | |
# Mono 2.10 is required since we need C# 4.0 support to compile IronRuby. | |
# C# 4.0 support can either be found in mono 2.10 or 2.6 compiled with special | |
# flags. |
This file contains hidden or 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 | |
namespace Nrk\Monolog\Handler; | |
use Predis\Client; | |
use Monolog\Logger; | |
use Monolog\Formatter\JsonFormatter; | |
use Monolog\Handler\AbstractProcessingHandler; | |
/** |
This file contains hidden or 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 | |
namespace Nrk; | |
use Predis\Distribution\HashRing; | |
// NOTE: this class won't work with a version of Predis prior to commit b30f495 | |
class AliasBasedHashRing extends HashRing { | |
public function add($node, $weight = null) { |
This file contains hidden or 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
smartctl -a /dev/rdsk/c1t1d0 -d sat,12 |
This file contains hidden or 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
local lol = { | |
wut = function(self, ...) | |
error("LOL WUT") | |
end, | |
} | |
-- this would normally be used like: lol:wut(1,2) | |
local s,e = pcall(lol.wut, lol, 1, 2) | |
print(s,e) -- false lol.lua:3: LOL WUT |
This file contains hidden or 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
require 'redis' | |
Redis.define_command('create_table', { | |
request = function(client, command, ...) | |
local args, arguments = {...}, {} | |
if #args ~= 2 then | |
print ('Usage: create_table tablename column_definitions'); | |
return false; | |
end | |
table.insert(arguments, 'TABLE'); |
This file contains hidden or 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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 dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |