This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
altinitycloud = { | |
source = "altinity/altinitycloud" | |
# https://github.com/altinity/terraform-provider-altinitycloud/blob/master/CHANGELOG.md | |
version = "0.1.2" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A core concept in blockchains is the ability to store, update and access the balances of an account. In addition, it allows querying the historical balances of an account as well. | |
// | |
// Design a stateful structure allows setting the current balance of an account, as well as retrieving the balance at the current or any previous point in time. | |
// | |
// **Interface:** | |
// | |
// - `set(account, balance)` | |
// - `get(account, height)` | |
// - `increment_height()` | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const oldData = { | |
"region": "us-west-1", | |
"sku": { | |
"tier": "standard", | |
"name": "s1a", | |
}, | |
"replication": "local", | |
"oldKey": "oldVal" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const assert = require('assert') | |
async function run () { | |
const { data: users } = await axios.get('https://reqres.in/api/users') | |
assert.equal(users.data.length, 6) | |
const { data: user } = await axios.get('https://reqres.in/api/users/' + users.data[0].id) | |
assert.equal(user.data.first_name, 'George') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IP Privada | |
$ ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | |
# IP Publica | |
$ curl ifconfig.me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gistup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
const server = serve({ hostname: "0.0.0.0", port: 8080 }); | |
console.log(`HTTP webserver running. Access it at: http://localhost:8080/`); | |
for await (const request of server) { | |
let bodyContent = "Your user-agent is:\n\n"; | |
bodyContent += request.headers.get("user-agent") || "Unknown"; | |
request.respond({ status: 200, body: bodyContent }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkdir | |
> Crear directorios | |
`$ mkdir my-files` | |
`$ mkdir my-files/txt` | |
`$ mkdir -p my-files/txt/new/path` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
echo "🚨 Tene cuidado con lo que copias y pegas en la terminal" | |
echo "😈 Esto podria haber hecho algo peligroso" | |
echo "" | |
echo "🙅 Nunca lo hagas a menos que sea seguro y confies en la fuente" | |
echo "" | |
echo "" |
NewerOlder