Skip to content

Instantly share code, notes, and snippets.

View oyiptong's full-sized avatar

Olivier Yiptong oyiptong

View GitHub Profile
require 'ranking/by_exponential_decay'
require 'dispatcher'
Dispatcher.to_prepare { Cluster.class_eval { include RankByExponentialDecay } }
$ curl -v -X POST -H Content-Type:application/json -d '{"touch\u00e9" : "\u3042"}' http://localhost:7474/db/data/node
* About to connect() to localhost port 7474 (#0)
* Trying ::1... Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 7474 (#0)
> POST /db/data/node HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:7474
> Accept: */*
> Content-Type:application/json
$ curl -v -X POST -H Content-Type:application/json -d '[{"method":"POST", "to":"/node", "body":{"touch\u00e9" : "\u3042"}}]' http://localhost:7474/db/data/batch
* About to connect() to localhost port 7474 (#0)
* Trying ::1... Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 7474 (#0)
> POST /db/data/batch HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:7474
> Accept: */*
> Content-Type:application/json
@oyiptong
oyiptong / graphite.md
Created April 20, 2012 18:14 — forked from caged/graphite.md
Installing Graphite on OS X Lion using brew, pythonbrew and virtualenv

This is a general overview (from memory) of the steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion. I think the steps are in order but YMMV. Please fork and fix if you find an error.

Install Python 2.7.2

curl -kL http://xrl.us/pythonbrewinstall | bash
echo '[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc' >> ~/.bashrc
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
pythonbrew install 2.7.2
pythonbrew use 2.7.2
pythonbrew venv create graphite
@oyiptong
oyiptong / oyiptong_tmux_config.md
Last active December 29, 2015 00:39
my tmux configuration on Mac OS X, and details on getting it to work on gnu/linux machines

Tmux config

Quick notes:

  • Each unfocused window to be displayed in blue in the lower-most part of the screen
  • The focused window is in red
  • When there is activity in a window, it will flash in white
  • The escape key is Control-z instead of Control-b. Seems to work better in minimizing hand travel
  • Hostname is displayed in green on the far right
  • Horizontal split windows: Control-|
/**
* Creates an Article Collection that will be used to sync data for the Ribbon and the
* Arrow buttons
*
* <p><b>Require Path:</b> shared/ribbon/collections/ribbon</p>
*
* @module Shared
* @submodule Shared.Ribbon
* @class Collection
* @constructor
/**
* Adds the ability to navigate through a ribbon on a page.
*
* <p><b>Require Path:</b> shared/ribbon/views/ribbon</p>
*
* @module Shared
* @submodule Shared.Ribbon
* @namespace Ribbon
* @class View
/**
* Creates a new instance of the ribbon feed collection
*
* <p><b>Require Path:</b> shared/ribbon/instances/ribbon-data</p>
*
* @module Shared
* @submodule Shared.Ribbon
* @class RibbonDataInstance
* @static
/**
* Creates a default new instance of the ribbon
*
* <p><b>Require Path:</b> shared/ribbon/instances/ribbon</p>
*
* @module Shared
* @submodule Shared.Ribbon
* @class RibbonInstance
* @static
/**
* The ribbon page navigation
*
* <p><b>Require Path:</b> shared/ribbon/views/ribbon-page-navigation</p>
*
* @module Shared
* @submodule Shared.Ribbon
* @namespace Ribbon.PageNavigation
* @class View