Skip to content

Instantly share code, notes, and snippets.

View Verikon's full-sized avatar

Verikon

  • Philadelphia, PA; Melbourne, Australia.
View GitHub Profile
/**
Invoke a method in an RPC ( REST-LIKE ) means.
@param String queue - the name of the queue youd like to invoke
@param Object message - the props object for this invocation. eg { username: 'bren', password: 'mypass' }
@param Function callback - OPTIONAL, a callback to fire with the response ; the response will be JSON parsed
@param Object options - OPTIONAL header options to pass on with your STOMP request - see https://www.rabbitmq.com/stomp.html for details
@return Promise - resolves with the JSON parsed reponse from the server.
**/
@Verikon
Verikon / gist:c282f2b927944a33e10b
Created April 6, 2015 20:28
mixin class for React 0.13 ,
var React = require( 'react' );
class MixableComponent extends React.Component{
constructor( props ){
//when we can do arrow functions - remove this.
this.mix = this.mix.bind( this );
if( props.mixins )
@Verikon
Verikon / gist:20b7c0c22894384faa9c
Last active August 29, 2015 14:07
Using PaypalButtons - the online version.
document.addEventListener( 'DOMContentLoaded', function() {
var parentNode = document.querySelector('#paypalButon');
PAYPAL.apps.ButtonFactory.create( 'YOUR PAYPAL ID', {
button: { value: 'buynow' },
name: { value: 'Some Product' },
quantity: { value: '1' },
amount: { value: '5.99' },
currency: { value: 'AUD' },