Skip to content

Instantly share code, notes, and snippets.

View Lakshmipathi's full-sized avatar
👣

Lakshmipathi Ganapathi Lakshmipathi

👣
View GitHub Profile
@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
@Lakshmipathi
Lakshmipathi / README.md
Created September 8, 2021 04:46 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.