Skip to content

Instantly share code, notes, and snippets.

View CarlosLanderas's full-sized avatar

Carlos Landeras CarlosLanderas

View GitHub Profile
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@WietseWind
WietseWind / ripple-xrp.js
Created October 25, 2017 16:58
Ripple XRP API (NodeJS) - Send XRP
var RippleAPI = require('ripple-lib').RippleAPI
var api = new RippleAPI({ server: 'wss://s1.ripple.com' }) // Public rippled server
var myAddress = 'xxxxxxx'
var mySecret = 'yyyyyyy'
api.on('error', function (errorCode, errorMessage) {
console.log(errorCode + ': ' + errorMessage)
})
api.on('connected', function () {