Skip to content

Instantly share code, notes, and snippets.

View AndresR173's full-sized avatar

Andres Rojas AndresR173

View GitHub Profile
@AndresR173
AndresR173 / nodejs-tcp-example.js
Created January 7, 2021 18:12 — forked from tedmiston/nodejs-tcp-example.js
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@AndresR173
AndresR173 / Demo.swift
Created February 12, 2020 15:07 — forked from AliSoftware/Demo.swift
NestableCodingKey: Nice way to define nested coding keys for properties
struct Contact: Decodable, CustomStringConvertible {
var id: String
@NestedKey
var firstname: String
@NestedKey
var lastname: String
@NestedKey
var address: String
enum CodingKeys: String, NestableCodingKey {