Skip to content

Instantly share code, notes, and snippets.

@piatra
piatra / error.js
Created August 14, 2013 12:55
receipt error
Error making purchase [Error: [payswarm.postJsonLd] Invalid response from "https://dev.payswarm.com/transactions"; malformed JSON - Error: no receipt received: {}]
@piatra
piatra / asset.js
Created September 29, 2013 20:52
listing
{
"@context": "https://w3id.org/payswarm/v1",
"__v": 1,
"_id": "524891411518809248000001",
"assetContent": "http://12e29bb4.ngrok.com/assets/asset/1416b776835/content",
"assetProvider": "https://dev.payswarm.com/i/webpay",
"id": "http://12e29bb4.ngrok.com/assets/asset/1416b776835",
"listingId": "1416b776835",
"signature": {
"type": "GraphSignature2012",
@piatra
piatra / gist:7168698
Last active December 26, 2015 14:49
Useful
### adb libraries missing in Ubuntu
* apt-get install lib32ncurses5 lib32stdc++6
### Installing mercurial
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial
* https://developer.mozilla.org/en/docs/Installing_Mercurial
@piatra
piatra / index.html
Last active December 29, 2015 03:59
Demo for working with the chrome dev tools
<html>
<head>
<title>
My webpage
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Real time web apps</h1>
</body>
@piatra
piatra / project.clj
Created December 8, 2013 00:10
Example configuration file for a CLJS Node project.
(defproject node "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1978"]]
:plugins [[lein-cljsbuild "0.3.4"]]
:cljsbuild {
@piatra
piatra / index.html
Created February 26, 2014 22:27
getUserMedia in Firefox OS 1.4
<!DOCTYPE html>
<html>
<head>
<title>getUserMedia - Demo</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>getUserMedia - Demo</h1>
<video autoplay></video>
<button id="capture">Capture</button>
@piatra
piatra / peerjsdemo.html
Created April 12, 2014 09:08
peer js demo
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<button>connect</button>
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
@piatra
piatra / .vimrc
Last active July 14, 2016 00:23
execute pathogen#infect()
let g:pathogen_disabled = []
if has("gui")
" You complete me ! <3
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_show_diagnostics_ui=0
" colorscheme
@piatra
piatra / plugins
Last active August 29, 2015 14:04
vim setup
YouCompleteMe
Zenburn
ctrlp.vim
detectindent
easybuffer.vim
nerdcommenter
nerdtree
python-mode
rust.vim
syntastic
@piatra
piatra / script.js
Created August 24, 2014 20:19
[Backbone router] Child route to trigger parent route action as well
(function() {
"use strict";
var MyRouter = Backbone.Router.extend({
routes: {
"/" : "home",
"user/:username" : "profilePage",
"user/:username/following": "following",
"user/:username/followers": "followers"
},