Skip to content

Instantly share code, notes, and snippets.

View Vaisakhkm2625's full-sized avatar

Vaisakh K M Vaisakhkm2625

  • <-- you don't need to know :)
View GitHub Profile
@Vaisakhkm2625
Vaisakhkm2625 / starpatternsin.py
Created July 6, 2024 21:53
star-pattern-sinwave
for i in range(1,10000):
print(round(35+35*math.sin(i/5))*" ","*")
# https://jeancharles.quillet.org/posts/2022-01-30-Local-mariadb-server-with-nix-shell.html
let pkgs = import <nixpkgs> {};
in pkgs.mkShell {
buildInputs = [ pkgs.mariadb ];
shellHook = ''
MYSQL_BASEDIR=${pkgs.mariadb}
MYSQL_HOME=$PWD/mysql
MYSQL_DATADIR=$MYSQL_HOME/data
export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock
MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid

make qr code for selected text

let selection = window.getSelection().toString();
let encodedSelection = encodeURIComponent(selection)

let popupContent = `<html lang="en">
<head>
 
@Vaisakhkm2625
Vaisakhkm2625 / snippetmanagers.md
Created February 22, 2024 10:06
cli snippet managers
@Vaisakhkm2625
Vaisakhkm2625 / gist:ba1ff2503f1b2748a010f42837675d7f
Last active October 20, 2023 20:51
host sveltekit in github pages
```
npm i -D @sveltejs/adapter-static
```
```
echo "export const prerender = true;" >> ./src/routes/+layout.js
```
change
```
@Vaisakhkm2625
Vaisakhkm2625 / pythondevenv.md
Last active October 12, 2023 18:29
Nix dev environment python

Using pip and virtualenv

mkdir projectname
cd projectname

initating the template

nix flake init --template github:the-nix-way/dev-template#python # this should be in bash
@Vaisakhkm2625
Vaisakhkm2625 / docker.md
Created June 20, 2023 11:53
docker - my notes

docker build -t dockerfile . docker run --expose 5000 -p 5000:5000 dockerfile

docker ps
docker exec -it <container_name> bash
@Vaisakhkm2625
Vaisakhkm2625 / vimlatexrederingplugins.md
Last active June 15, 2023 23:07
VIM Latex redering plugins