-
ssh -t marge@ts-dev.us "cd topscore; bash"- connect to server -
git fetch && git merge origin/master- get latest changes -
git add -A && git commit -m "message goes here"- commit changes -
git push- push changes -
./symfony fs:snapshot s3- load the latest database snapshot
| <html> | |
| <head> | |
| <title>Demo</title> | |
| </head> | |
| <body> | |
| <h1>PHP Mongo Test</h1> | |
| <?php | |
| $services = getenv("VCAP_SERVICES"); | |
| echo "<h2>VCAP_SERVICES</h2>"; | |
| echo "<p>" . $services . "</p>"; |
| <?php | |
| if (isset($_SERVER['SCRIPT_FILENAME'])) { | |
| return false; | |
| } else { | |
| $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] | |
| . DIRECTORY_SEPARATOR | |
| . 'app.php' | |
| ; |
| module Jekyll | |
| module Convertible | |
| def do_layout(payload, layouts) | |
| info = { :filters => [Jekyll::Filters], :registers => { :site => self.site } } | |
| # render and transform content (this becomes the final content of the object) | |
| payload["pygments_prefix"] = converter.pygments_prefix | |
| payload["pygments_suffix"] = converter.pygments_suffix | |
| begin |
| #!/usr/bin/env bash | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 /path/to/your/subscriptions.xml" | |
| exit 1 | |
| fi | |
| grep -o 'xmlUrl="[^"]\+' "$1" | cut -d'"' -f2 | while read FEED; do | |
| FEED_URL="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$FEED")" | |
| URL="https://www.google.com/reader/api/0/stream/contents/feed/${FEED_URL}?r=n&n=99999" |
| <?php | |
| /** | |
| * A CharacterStream implementation which skips over all the manual processing | |
| * performed by NgCharacterStream in favour of using the mb_ extension. | |
| * | |
| * @package Swift | |
| * @author mappu | |
| */ | |
| class Swift_CharacterStream_MbCharacterStream implements Swift_CharacterStream { |
| <?php | |
| /** | |
| * Basic dispatch function, uses array structured as [$verb => [$path => $route_fn, ...]] | |
| * calling $route_fn if $path/$verb match the arguments passed | |
| * | |
| * @param $path_condition regex for matching paths (must use suitable deliminator, eg. @) | |
| * | |
| * @throws Exception when path/route function missing (programmer error) | |
| * @return bool true for successful route, false for no route/404 | |
| */ |
| git config --global --replace-all alias.relate '!f(){ git for-each-ref --format="%(refname:short) %(upstream:short)" refs | while read -r l r; do printf "%24s %s\\n" "$(git rev-list --cherry-mark --dense --left-right --boundary --oneline "${r:-${1:-HEAD}}...$l" -- | sed "s/^\\(.\\).*/\\1/" | sort | uniq -c | tr -d " " | tr "\\n" " ")" "$l"; done; }; f' | |
| git config --global --replace-all alias.graph '!f(){ case "$#:$1" in 0:) r="HEAD...HEAD@{u}";; 1:*...*) r="$1";; 1:*) r="HEAD...$1";; *) r="$1...$2";; esac; git rev-list --cherry-mark --dense --left-right --boundary --pretty --graph "$r" -- | less -XFp "$(git rev-parse "${r%...*}")"; }; f' | |
| git config --global --replace-all alias.graph1 '!f(){ case "$#:$1" in 0:) r="HEAD...HEAD@{u}";; 1:*...*) r="$1";; 1:*) r="HEAD...$1";; *) r="$1...$2";; esac; git rev-list --cherry-mark --dense --left-right --boundary --oneline --graph "$r" -- | less -XFp "$(git rev-parse "${r%...*}")"; }; f' | |
| # THIS IS PUBLIC DOMAIN. | |
| # Thanks to the makers of GIT for the extremely impressiv |
Today, there is no reliable way to persist metadata for digital media as it travels across the internet.
Mine is working to build a global content registry on top of the Bitcoin blockchain to serve as an open metadata layer for canonical representations of digital media.
The goal of such a registry is to enable a new decentralized hypermedia protocol that powers the next generation of digital content applications, where creators and consumers to own their media, identity and interactions across the internet, without dependency on industrial or platform gatekeepers.
In March, we published a high level summary of how such such a system could work, titled the Canonical Content Registry. Today, we are taking the first steps to start building it by sharing a proposal for a technical implementation on top of Blockstore. We welcome your feedback and look forward to starting a conversation.
| // usage: log('inside coolFunc', this, arguments); | |
| // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ | |
| window.log = function(){ | |
| log.history = log.history || []; // store logs to an array for reference | |
| log.history.push(arguments); | |
| if(this.console) { | |
| arguments.callee = arguments.callee.caller; | |
| console.log( Array.prototype.slice.call(arguments) ); | |
| } | |
| }; |