Skip to content

Instantly share code, notes, and snippets.

View thiagodelgado111's full-sized avatar

Thiago Delgado thiagodelgado111

View GitHub Profile
{
"name" : "Microsoft Azure",
"description" : "This theme includes element styles with icons for each of the Azure services, based upon the Microsoft Azure icon set (https://docs.microsoft.com/en-us/azure/architecture/icons/).",
"elements" : [ {
"tag" : "Microsoft Azure - Container Apps Environments",
"stroke" : "#9869eb",
"color" : "#9869eb",
"icon" : "https://raw.githubusercontent.com/structurizr/themes/master/microsoft-azure-2023.01.24/02989-icon-service-Container-Apps-Environments.png"
}, {
"tag" : "Microsoft Azure - Controls Horizontal",
@thiagodelgado111
thiagodelgado111 / intro.md
Created April 5, 2020 03:30 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
@thiagodelgado111
thiagodelgado111 / StoreBuilder.js
Created September 4, 2018 17:17
StoreBuilder
class StoreBuilder {
constructor(StoreClass, ipfs, peerId, address) {
if (!StoreClass) throw new Error('Store class to build not defined')
if (!ipfs) throw new Error('IPFS is required')
if (!peerId) throw new Error('peerId is required')
if (!address) throw new Error('Store address is required')
this.StoreClass = StoreClass
this.ipfs = ipfs
pragma solidity ^0.4.15;
contract Example {
address public owner;
function Example () {
owner = msg.sender;
}
@thiagodelgado111
thiagodelgado111 / complexity_test.js
Last active November 25, 2016 15:24
eslint complexity rule question
const a = true;
const b = false;
const c = true;
if (a && b && c) {
throw new Error('zomg!');
}
if (a || b || c) {
@thiagodelgado111
thiagodelgado111 / mantras
Last active February 20, 2016 15:06 — forked from IngmarBoddington/mantras
Coding Mantras
* Don't Repeat Yourself - DRY
- Don't repeat code
- Use reusability
* Keep It Simple Stupid - KISS
- Don't overcomplicate for it's own sake
* Don't make me think.
* Program to an interface.
* Composisition over inheritance.
@thiagodelgado111
thiagodelgado111 / custom_server_start.js
Created September 29, 2015 15:14
Starting TCP socket server
var client = new CustomServer(CONFIG_PARAMETERS);
client.createConnection();
client.open();
client.on('serverCreated', function(socket) {
if (!!client.socket) {
if (FIXTURES.Nodes.length > 0) {
@thiagodelgado111
thiagodelgado111 / CustomServer.js
Last active September 29, 2015 15:21
Custom server TCP
/*jslint node: true */
var net = require('net');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var _ = require('lodash');
var S = require('string');
var traceback = require('traceback');
var dateFormat = require('date-format');
var os = require("os");
var dcrypt = function(a){
var letters = "acdegilmnoprstuw";
var str = "";
var dcrypted = false;
while(!dcrypted){
for(var i = 0; i < letters.length; i++)
{
var bencode = new Bencode();
bencode.Encoding.Encode(1); //"i1e"
bencode.Encoding.Encode([1,2,3, {"Test" : 123} ]); //"li1ei2ei3ed4:Testi123eee"
bencode.Encoding.Encode("Test"); //"4:Test"
bencode.Encoding.Encode(-1), //"i-1e"
bencode.Encoding.Encode(0); //"i0e"
bencode.Encoding.Encode(01); //"i1e" `
bencode.Decoding.Decode("i10e"); //10