Skip to content

Instantly share code, notes, and snippets.

View 34r7h's full-sized avatar
💭
Networking

34r7h

💭
Networking
View GitHub Profile
@nothingalike
nothingalike / _Simple_Cardano_Lite_Wallet.md
Last active October 14, 2021 13:00
Simple Cardano Lite Wallet

Warning

This is purely for demonstration purposes only.

Requirements

  • node v10+
  • cardano-cli
  • cardano-address

Setup

  1. create new folder
@RoadRunnr
RoadRunnr / dtls_client.erl
Created February 8, 2016 07:50
Erlang DTLS sample client
-module(dtls_client).
-export([connect/1]).
psk_verify(Username, UserState) ->
io:format("Server Hint: ~p~n", [Username]),
{ok, UserState}.
connect(Port) ->
[application:start(X) || X <- [crypto, asn1, public_key, ssl]],

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@KrofDrakula
KrofDrakula / template.js
Last active October 3, 2015 06:01
An easily understandable templating function
// A very light-weight templating function
// Use <% ... %> to embed code, <%= ... %> to output expressions.
//
// Caveat: because the parser makes no attempts at interpreting
// any `<%` and `%>` inside code blocks, so if you need
// metatemplating, you need to escape those sequences
// just like '<scr'+'ipt>' in script tags.
//
// See examples of usage below.
function template(str, params) {