Skip to content

Instantly share code, notes, and snippets.

View Lakshmipathi's full-sized avatar
👣

Lakshmipathi Ganapathi Lakshmipathi

👣
View GitHub Profile
@Lakshmipathi
Lakshmipathi / Demo Scylla Manager with Docker
Created July 8, 2024 03:41 — forked from tzach/Demo Scylla Manager with Docker
Running a demo of a 3 node Scylla cluster, Scylla Manager and Monitoring
# Start a Scylla cluster
########################
docker run --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
# Do not use the above --api-address for production. Exposing API IP is not secure.
SEED=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-scylla)
echo $SEED
docker run --name some-scylla2 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"
docker run --name some-scylla3 -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0 --seeds="$SEED"

Measuring Firecracker boot time

Firecracker comes with an internal way of logging a timestamp that measures time elapsed between the very start of the guest VM and the moment a specific IO port has been written to.

That allows for marking specific moment along the boot process by having code writing to this port.

Artifacts build

Here we're going to measure the time it takes for a Firecracker guest VM to reach userspace. To do so we're going to build 3 components:

@Lakshmipathi
Lakshmipathi / update-golang.md
Created July 18, 2022 04:42 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@Lakshmipathi
Lakshmipathi / postgres_queries_and_commands.sql
Created June 10, 2022 15:32 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), 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(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@Lakshmipathi
Lakshmipathi / systemd_service_hardening.md
Created June 7, 2022 06:13 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@Lakshmipathi
Lakshmipathi / user-mode-linux-alpine-steps.txt
Created March 27, 2022 09:07 — forked from hughpearse/user-mode-linux-alpine-steps.txt
User Mode Linux (UML) Kernel With Alpine Linux OS
How to compile the linux kernel, launch it as a process and boot into Alpine linux
Command + Shift + 5
Host -> Docker GCC -> UML w/ Alpine
# get docker for compiling
foo@host:~$ docker pull gcc
# launch new container
foo@host:~$ docker run --privileged --name gcc -it gcc /bin/bash
@Lakshmipathi
Lakshmipathi / typescript-crash.ts
Created January 27, 2022 18:33 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@Lakshmipathi
Lakshmipathi / v8gen.py.txt
Created December 1, 2021 13:52 — forked from AlexMasterov/v8gen.py.txt
gn args {V8}/out.gn/x64.release/ --list (V8 v7.1.163)
action_pool_depth
Current value (from the default) = -1
From //build/toolchain/BUILD.gn:10
Pool for non goma tasks.
android_full_debug
Current value (from the default) = false
From //build/config/compiler/BUILD.gn:48
@Lakshmipathi
Lakshmipathi / install_debian_with_debootstrap_howto.md
Created November 24, 2021 12:59 — forked from varqox/install_debian_with_debootstrap_howto.md
Instructions how to install Debian using debootstrap