Skip to content

Instantly share code, notes, and snippets.

View levymoreira's full-sized avatar

Levy Moreira levymoreira

  • Microsoft
  • Dublin, Ireland
View GitHub Profile
@levymoreira
levymoreira / bfs.js
Created November 4, 2017 18:22
JS bfs impl
class Node {
constructor(id, value, adjacent) {
this.id = id;
this.value = value;
this.adjacent = adjacent;
}
}
@levymoreira
levymoreira / dfsBfs.js
Created November 6, 2017 12:06
dfsBfs
const _ = require('underscore');
class Node {
constructor(id, value, adjacent) {
this.id = id;
this.value = value;
this.adjacent = adjacent;
}
var bitcoin = require("bitcoinjs-lib");
var axios = require("axios");
const TestNet = bitcoin.networks.testnet;
// https://testnet.manu.backend.hamburg/faucet
// https://testnet.coinfaucet.eu/en/
// https://testnet.blockexplorer.com/address/n2AxiA2Fd7y4spAciPXKUxKFpEPezpyRzR
const run = async () => {
@levymoreira
levymoreira / bitcoreSample.js
Created May 12, 2018 21:49
Sending bitcoin transaction with bitcore
var bitcore = require('bitcore-lib');
var Transaction = bitcore.Transaction;
var explorers = require('bitcore-explorers');
var bitcoinaddress = require('bitcoinaddress');
var c2p = require('callback-promise');
const insight = new explorers.Insight('testnet');
var privateKey = bitcore.PrivateKey.fromWIF('cW4r4rajDoKwpEgRPkyF7w7HLaZ7R9zBEDwHtVf2RR1EyBCggESB');
@levymoreira
levymoreira / test.js
Created November 24, 2019 18:53
test.js
alert('iframe test js ');
@levymoreira
levymoreira / index.html
Created November 24, 2019 19:03
index.html
<!DOCTYPE html>
<html>
<body>
<script src="https://gist.githubusercontent.com/levymoreira/6d22c037e011223d999d81837fae6e12/raw/bc11cbcdb416979fa4b4d51a0f0b93b0032dadba/test.js">
</script>
</body>
</html>
@levymoreira
levymoreira / template.json
Created May 16, 2025 20:34
arm template json 2 ips 1 LB
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "The location for all resources."
}
@levymoreira
levymoreira / gist:42d4ae3c8d04097708f30f8f33dc878b
Created May 17, 2025 09:20
2 LB 1 VMSSET (differnt ports!)
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "The location for all resources."
}
@levymoreira
levymoreira / template.json
Created May 17, 2025 10:31
2 VMSS and 2 LB
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "The location for all resources."
}