Skip to content

Instantly share code, notes, and snippets.

View royki's full-sized avatar
😃
I may be slow to respond.

ROY royki

😃
I may be slow to respond.
View GitHub Profile
@royki
royki / cue_for_devops.md
Created May 19, 2024 23:45 — forked from ptMcGit/cue_for_devops.md
CUE for DevOps

CUE for DevOps

Overview

This is a tutorial that uses a toy infrastructure project to highlight some of CUE's features and show how it can be used to simplify and manage infrastructure. Go to Tutorial if you want to skip the introductory stuff.

What is CUE?

From cuelang.org:

@royki
royki / deploy.yaml
Created January 5, 2024 13:16 — forked from alonsoir/deploy.yaml
ansible script to gather VAULT_TOKEN from a VAULT server and run a process which need it. The idea is to maintain secrets in secure, deleting VAULT_TOKEN from file system and historic.
---
- name: Ejecutar Proceso con VAULT_TOKEN
hosts: localhost # Puedes ajustar los hosts según tu entorno
gather_facts: false # Desactivar recopilación de hechos
vars:
vault_address: "http://direccion-de-tu-vault:8200" # Ajusta la dirección de tu Vault Server
tasks:
- name: Establecer VAULT_TOKEN como variable de entorno

Keybase proof

I hereby claim:

  • I am royki on github.
  • I am royki (https://keybase.io/royki) on keybase.
  • I have a public key ASCQVvh550YJ-MixnyhzbZGNT4PJBsDl_4zj71yrvlsxIgo

To claim this, I am signing this object:

@royki
royki / alice.log
Created July 4, 2023 19:24
Relaychain Error
2023-07-04 19:16:36.788 TRACE tokio-runtime-worker gossip: Cleaned up 0 stale messages, 0 left (0 known) protocol=/cb78cf8b70f6db4099d9de03e2cdf98a56ef49fc04d22bd460a7b6bb598c4310/grandpa/1
2023-07-04 19:16:37.888 TRACE tokio-runtime-worker gossip: Cleaned up 0 stale messages, 0 left (0 known) protocol=/cb78cf8b70f6db4099d9de03e2cdf98a56ef49fc04d22bd460a7b6bb598c4310/grandpa/1
2023-07-04 19:16:38.079 INFO tokio-runtime-worker substrate: 💤 Idle (1 peers), best: #0 (0xcb78…4310), finalized #0 (0xcb78…4310), ⬇ 0 ⬆ 0
2023-07-04 19:16:38.403 DEBUG tokio-runtime-worker sync: Propagating transactions
2023-07-04 19:16:38.899 TRACE tokio-runtime-worker sub-libp2p: Ping time with PeerId("12D3KooWBzwDUvxn9X9Zz4E9SYgWoNYFwoMU6GRTJbD7E7tZYjpj"): 290.082µs
2023-07-04 19:16:38.924 TRACE tokio-runtime-worker sub-libp2p: Ping time with PeerId("12D3KooWBzwDUvxn9X9Zz4E9SYgWoNYFwoMU6GRTJbD7E7tZYjpj"): 211.812µs
2023-07-04 19:16:38.988 TRACE tokio-runtime-worker gossip: Cleaned up 0 stale messages, 0 left (0 know
@royki
royki / cloud-config.yml
Last active March 25, 2023 05:57
Packer template to build aws ami
package_update: true
package_upgrade: true
groups:
- docker
users:
- name: ubuntu
groups: docker
- name: telegraf
groups: docker
cloud_config_modules:
@royki
royki / blockscout-error.md
Created August 12, 2022 14:55
GenServer.call(Indexer.Fetcher.InternalTransaction, {:buffer, [19426479]}, 10000)
blockscout_1  | 2022-08-12T14:53:30.577 [error] Task #PID<0.3980.361> started from Indexer.Block.Realtime.Fetcher terminating
blockscout_1  | ** (stop) exited in: GenServer.call(Indexer.Fetcher.InternalTransaction, {:buffer, [19426479]}, 10000)
blockscout_1  |     ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
blockscout_1  |     (elixir 1.13.1) lib/gen_server.ex:1019: GenServer.call/3
blockscout_1  |     (indexer 0.1.0) lib/indexer/block/realtime/fetcher.ex:385: Indexer.Block.Realtime.Fetcher.async_import_remaining_block_data/2
blockscout_1  |     (indexer 0.1.0) lib/indexer/block/realtime/fetcher.ex:224: Indexer.Block.Realtime.Fetcher.import/2
blockscout_1  |     (indexer 0.1.0) lib/indexer/block/fetcher.ex:167: Indexer.Block.Fetcher.fetch_and_import_range/2
blockscout_1  |     (indexer 0.1.0) lib/indexer/block/realtime/fetcher.ex:293: Indexer.Block.Realtime.Fetcher.do_fetch_and_import_blo
@royki
royki / Blockscout-error-log-1.md
Last active April 29, 2022 13:03
Could not insert all of chunk into Elixir.Explorer.Chain.InternalTransaction and ERROR 23503 (foreign_key_violation)
blockscout_1  | 
blockscout_1  | Options:
blockscout_1  | 
blockscout_1  | [conflict_target: [:block_hash, :block_index], on_conflict: #Ecto.Query<from i0 in Explorer.Chain.InternalTransaction, where: fragment("(EXCLUDED.transaction_hash, EXCLUDED.index, EXCLUDED.call_type, EXCLUDED.created_contract_address_hash, EXCLUDED.created_contract_code, EXCLUDED.error, EXCLUDED.from_address_hash, EXCLUDED.gas, EXCLUDED.gas_used, EXCLUDED.init, EXCLUDED.input, EXCLUDED.output, EXCLUDED.to_address_hash, EXCLUDED.trace_address, EXCLUDED.transaction_index, EXCLUDED.type, EXCLUDED.value) IS DISTINCT FROM (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", i0.transaction_hash, i0.index, i0.call_type, i0.created_contract_address_hash, i0.created_contract_code, i0.error, i0.from_address_hash, i0.gas, i0.gas_used, i0.init, i0.input, i0.output, i0.to_address_hash, i0.trace_address, i0.transaction_index, i0.type, i0.value), update: [set: [block_number: fragment("EXCLUDED.block_number"), call_type: fragment("EXCLUDED.c
@royki
royki / OpenVpn.md
Last active January 19, 2021 17:24
OpenVpn Client setup in windows
  1. In Windows - Edit registry key
  • Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • Change following Value 0 to 1 IPEnableRouter
@royki
royki / Raft
Created January 12, 2021 00:05
Consensus Algorithm
- Consensus Algoriithm must have -
- Agreement -> Where every correct process must agree on the same value.
- Validity -> The value agreed on must have been proposed by another process.
- Termination -> A value will eventually be decided by every correct process.
- CAP Theorem -> An algorithm cannot provide more than of the three following properties -
- Consistency
- Availability
- Partition Tolerance
- There are different types of failure that a consensus algorithm might have to deal with fail.
- Fail-stop
@royki
royki / Bash.md
Created January 11, 2021 22:42
Bash Tricks