Exported on 7/7/2025 at 16:37:01 GMT-4 from Cursor (1.1.6)
User
write a code that received the following input: <10 11 48 16 43 29 58 33 46 5> and returns the follwoing output: 63 59 75 49 53.
the same with:
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
func transform(nums []int) []int { | |
// Aquí quizás verificar que el input sea de 10, o de números pares? |
-- 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", |
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 |
Information related to this gist is avaiable on my personal page.
FROM ubuntu | |
COPY script.sh /tmp/script.sh | |
RUN chmod +x /tmp/script.sh | |
CMD ["bash", "-c", "/tmp/script.sh"] |
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 |
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)) |
#!/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} |