Skip to content

Instantly share code, notes, and snippets.

View boris's full-sized avatar
🏠
Working from home

Boris Quiroz boris

🏠
Working from home
View GitHub Profile
@boris
boris / init.lua
Created June 19, 2024 14:14
NeoVIM initial config
-- init.lua
-- Automatically install lazy.nvim if not installed
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
@boris
boris / gist:35bfae9e187cd7a6e6657984d0673345
Last active February 22, 2023 16:19
CF Tunnel TF debug
 TF_LOG=DEBUG terraform apply -var account_id=<account_id> -var api_key=<api_key> -var email="<user>@email.com"
2023-02-22T11:59:35.625-0300 [DEBUG] Adding temp file log sink: /tmp/terraform-log725224983
2023-02-22T11:59:35.625-0300 [INFO] Terraform version: 1.0.10
2023-02-22T11:59:35.625-0300 [INFO] Go runtime version: go1.16.4
2023-02-22T11:59:35.625-0300 [INFO] CLI args: []string{"/home/<user>/.tfenv/versions/1.0.10/terraform", "apply", "-var", "account_id=<account_id>", "-var", "api_key=<api_key>", "-var", "email=<user>@email.com"}
2023-02-22T11:59:35.625-0300 [DEBUG] Attempting to open CLI config file: /home/<user>/.terraformrc
2023-02-22T11:59:35.625-0300 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2023-02-22T11:59:35.625-0300 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-02-22T11:59:35.625-0300 [DEBUG] ignoring non-existing provider search directory /home/<user>/.terraform.d/plugins
2023-02-22T11:59:35.625-0300 [DEBUG] ignoring non-existing provider
@boris
boris / Nomad CSI on AWS.md
Last active September 18, 2022 02:44
Nomad CSI on AWS

Information related to this gist is avaiable on my personal page.

@boris
boris / Dockerfile
Created March 12, 2022 03:04
Run script on docker init
FROM ubuntu
COPY script.sh /tmp/script.sh
RUN chmod +x /tmp/script.sh
CMD ["bash", "-c", "/tmp/script.sh"]
@boris
boris / lnd_on_ubuntu.md
Created December 10, 2021 19:46
How to run LND on Ubuntu

Install Lnd on Ubuntu

Goal, assumption and requirements: It assumed a linux box running Ubuntu with bitcoind already running. It also assumed that golang binary is installed.

ubuntu@bitcoin:~$ go version
go version go1.17.4 linux/arm64
ubuntu@bitcoin:~$ bitcoind --version
Bitcoin Core version v22.0.0

Bitcoind must be configured to use zeromq, as it's the way lnd and bitcoin will talk to each other. Configuration file must have following lines:

- Install packages:
sudo apt install tor nginx
- Create a minimal config file for nginx on /etc/nginx/sites-enabled/tor:
server {
listen 127.0.0.1:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
@boris
boris / find_nonce.py
Created June 26, 2021 16:12
find_nonce.py
import hashlib
import random
def generate_strings(length):
lower_chars = "abcdefghijklmnopqrstuvwxyz"
all_chars = lower_chars + lower_chars.upper()
while True:
yield ''.join(random.choice(all_chars) for i in range(length))
@boris
boris / bitcoind.sh
Created February 5, 2021 16:12
bitcoind.sh
#!/bin/bash
VER=0.21.0
ARCH="aarch64"
echo "Installing Bitcoind $VER"
setup(){
sudo mkdir /data
UUID=$(sudo blkid -s UUID -o value /dev/xvdf1)
echo "UUID=$UUID /data ext4 defaults 0 0"| sudo tee -a /etc/fstab
sudo mount -a
sudo mkdir -p /data/{bitcoin,conf}

Keybase proof

I hereby claim:

  • I am boris on github.
  • I am borisquiroz (https://keybase.io/borisquiroz) on keybase.
  • I have a public key whose fingerprint is F1B8 1974 430A B3EC 737F 0AC1 CE52 8506 9B8D 33E4

To claim this, I am signing this object:

package main
import "fmt"
func main() {
fmt.Println("hello world")
}