Project at https://github.com/fertapric/files
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
# fabric extension to enable handling expected prompts | |
# | |
# Read more at http://ilogue.com/jasper/blog/fexpect--dealing-with-prompts-in-fabric-with-pexpect/ | |
# | |
# This file Copyright (c) Jasper van den Bosch, ilogue, jasper@ilogue.com | |
# Pexpect Copyright (c) 2012 Noah Spurrier ,see: http://www.noah.org/wiki/pexpect#License | |
from fabric.state import env | |
import fabric.api |
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
require("riak-php-client/riak.php"); | |
$client = new RiakClient('127.0.0.1', 8098); | |
$mr = new RiakMapReduce($client); | |
$keys = array("TFrWAVz8RRVEEqCH3nS27O4InLB","FEwZgNI4VTJSIZxSas0QpOCCXjn","EkSkmblyIAT5VL7xYpScP2GP71G"); | |
foreach ($keys as $key) { | |
$mr->add("local_ns~users", $key); | |
} | |
$mr->map("Riak.mapValues"); |
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
DROP FUNCTION IF EXISTS SPLIT; | |
DROP FUNCTION IF EXISTS _SPLIT; | |
DROP FUNCTION IF EXISTS RTSPLIT; | |
DROP FUNCTION IF EXISTS LTSPLIT; | |
DELIMITER // | |
-- Simple Split (no trim) | |
CREATE FUNCTION SPLIT(S CHAR(255), DELIM VARCHAR(30), S_INDEX TINYINT UNSIGNED) RETURNS VARCHAR(255) | |
BEGIN | |
RETURN _SPLIT(S, DELIM, S_INDEX, '', 0); |
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
/* | |
<div id="editor"></div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<style> | |
.clearfix:after { | |
clear: both; | |
} | |
.clearfix:before, .clearfix:after { | |
content: " "; | |
display: table; |
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 | |
class T { | |
protected $Context = array(); | |
protected $Compiled = NULL; | |
public $Regex_Variable = '~\{\{\s+[a-z_0-9\|:\.]+\s+\}\}~imsu'; | |
public $Separator_Filter = '|'; | |
public $Separator_Directive = ':'; | |
protected $HTML_Encoder = NULL; | |
protected $HTML_ENCODE = TRUE; | |
protected $VALUE_CACHE = array(); |
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/python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import argparse | |
import readline | |
import rlcompleter | |
import shlex | |
import os | |
import re | |
try: |
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
from collections import MutableSequence | |
import marshal | |
from operator import add, div, mul, neg, mod, sub | |
from operator import ge, gt, le, lt, eq | |
from itertools import imap | |
''' | |
Extended list class | |
- fast lookups by maintaining a dictionary with the values | |
- numeric operations between 2 instances are possible (like Octave matrices) |
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
#### Start IPython, generate SHA1 password to use for IPython Notebook server | |
$ ipython | |
Python 2.7.5 |Anaconda 1.8.0 (x86_64)| (default, Oct 24 2013, 07:02:20) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 1.1.0 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. |
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 | |
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 |
OlderNewer