Skip to content

Instantly share code, notes, and snippets.

View jpascal's full-sized avatar

Evgeniy Shurmin jpascal

View GitHub Profile
@jpascal
jpascal / cloudflare_warp.tf
Created November 6, 2024 16:59 — forked from andymotta/cloudflare_warp.tf
Deploy Cloudflare WARP (VPN tunnel) on Kubernetes
provider "cloudflare" {
api_token = var.cf_api_token
}
variable "cf_api_token" {}
variable "account_id" {}
resource "random_id" "tunnel_secret" {
byte_length = 35
}
@jpascal
jpascal / restic_cron.sh
Created October 22, 2023 07:33 — forked from perfecto25/restic_cron.sh
Restic cron script
#!/bin/bash
# Runs Restic backup on a schedule via cron, emails with status
# 1. add a cred file with your repo logins to /etc/restic/cred
# 2.
FROM="restic@$(hostname)"
EMAIL="[email protected]"
LOG="/var/log/restic.log"
RDIR="/etc/restic"
@jpascal
jpascal / .about+license.md
Created January 27, 2020 14:21 — forked from anilnairxyz/.about+license.md
Candlestick Chart

A zoomable candlestick chart.

Copyright © 2015, Anil Nair - MIT License

@jpascal
jpascal / postgres_queries_and_commands.sql
Created January 16, 2018 11:39 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'