Skip to content

Instantly share code, notes, and snippets.

View ianaya89's full-sized avatar
👾

Nacho Anaya ianaya89

👾
View GitHub Profile
terraform {
required_providers {
altinitycloud = {
source = "altinity/altinitycloud"
# https://github.com/altinity/terraform-provider-altinitycloud/blob/master/CHANGELOG.md
version = "0.1.2"
}
}
}
// 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()`
//
@ianaya89
ianaya89 / index.js
Created June 9, 2023 13:16
Pulumi Interview
const oldData = {
"region": "us-west-1",
"sku": {
"tier": "standard",
"name": "s1a",
},
"replication": "local",
"oldKey": "oldVal"
}
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')
}
@ianaya89
ianaya89 / ip.sh
Created August 10, 2021 16:55
My IP
# IP Privada
$ ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'
# IP Publica
$ curl ifconfig.me
gistup
import { serve } from "https://deno.land/std@0.79.0/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 });
# mkdir
> Crear directorios
`$ mkdir my-files`
`$ mkdir my-files/txt`
`$ mkdir -p my-files/txt/new/path`
#!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 ""