Skip to content

Instantly share code, notes, and snippets.

@csokun
csokun / spike.yml
Created January 8, 2024 05:29
Helm loop n times
{{ $times := 2 }}
{{- range $i := until $times }}
#{{ $i }}
{{- end }}
@csokun
csokun / eks-alb-actions-conditions.yml
Created January 15, 2024 01:43
EKS ALB Controller actions & conditions
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
docker run -v $PWD/history:/working stellar/stellar-etl stellar-etl export_ledger_entry_changes \
--start-ledger 2 \
--end-ledger 500 \
--output /working/ \
--gcs-bucket "" \
--testnet \
-x /usr/bin/stellar-core \
-c docker/stellar-core_testnet.cfg
@csokun
csokun / stellar_export.sh
Last active January 30, 2024 05:14
Using stellar-etl to export ledgers|transactions|operations|effects|trades|assets|diagnostic_events
#!/bin/bash
# ref. https://github.com/stellar/stellar-etl/tree/master?tab=readme-ov-file#history-archive-commands
if [ $# -lt 3 ]; then
echo "Usage: $0 <export_type> <start_ledger> <end_ledger> [network]"
echo " $0 ledgers 2 500"
echo " $0 transactions 2 500 --futurenet"
echo " $0 operations 2 500 --testnet"
echo " $0 effects 2 500"
echo " $0 assets 2 500 --futurenet"
echo "===== History Archive URLs ====="
@csokun
csokun / cuda.sh
Created February 12, 2024 11:19
Install CUDA on Arch Linux (Majaro)
sudo pacman -S cuda cudnn
export PATH=$PATH:/opt/cuda/bin
nvcc --version
@csokun
csokun / bumblebee_example.exs
Created May 13, 2024 12:22
Bumblebee Example
Mix.install(
[
{:kino_bumblebee, "~> 0.5.0"},
{:exla, ">= 0.0.0"}
],
config: [nx: [default_backend: EXLA.Backend]]
)
repository_id = "nitrosocke/Ghibli-Diffusion"
{:ok, tokenizer} = Bumblebee.load_tokenizer({:hf, "openai/clip-vit-large-patch14"})