Skip to content

Instantly share code, notes, and snippets.

View yashasolutions's full-sized avatar
⌨️
testing in production

Yasha yashasolutions

⌨️
testing in production
View GitHub Profile
@yashasolutions
yashasolutions / venv.sh
Created March 11, 2024 10:01
venv - create & load virtual environment
# add to your .bashrc
# for quick project setup
function venv () {
# if project name is given
# create a new venv with the project name
# else create default venv
if [ -n "$1" ]; then
python3 -m venv .venv/$1
@yashasolutions
yashasolutions / volume-snapshot
Created March 3, 2024 11:20
docker volume snapshot
#!/bin/bash
set -e -o pipefail
programname=`basename "$0"`
display_usage() {
echo "usage: $programname (create|restore) source destination"
echo " create create snapshot file from docker volume"
echo " restore restore snapshot file to docker volume"
echo " source source path"
@yashasolutions
yashasolutions / tridactylrc
Created December 9, 2023 03:37
My Tridactyl Config
" vim: set filetype=tridactyl
"""" Tridactyl config - yasha.solutions
"""" This is mostly a mod based on a mix of Doom Emacs and vim old habits
"""" The general idea of this config is to create a unified experience between
"""" Emacs and Firefox which are my main daily driver
"""" This is supported by a good i3wm config which help glue the missing parts
"""" This is obviously a work in progress but I thought i'd made a snapshot
" Uncomment the lines you want to keep then move this file to
@yashasolutions
yashasolutions / normcore-llm.md
Created August 28, 2023 01:06 — forked from veekaybee/normcore-llm.md
Normcore LLM Reads
@yashasolutions
yashasolutions / stream-cam-linux.md
Last active February 8, 2023 02:49 — forked from endolith/readme.md
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

@yashasolutions
yashasolutions / dbtest.js
Last active February 8, 2023 01:33
node-db-test
import (
"context"
"fmt"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/mongo/readpref"
)
// Connection URI
@yashasolutions
yashasolutions / irssi twitch.txt
Created January 26, 2023 04:57 — forked from yyolk/irssi twitch.txt
Twitch chat with irssi - June 2021
Tested working 20 Jun 2021, irssi version 1.2.3
This is a TLDR version of https://blog.crunchprank.net/connecting-to-twitch-chat-via-irssi/
Get your OAuth token (password) here: https://twitchapps.com/tmi/
# Network setup:
/network add -nick YOUR_TWITCH_USERNAME twitch
/server add -auto -ssl -network Twitch irc.chat.twitch.tv 6697 YOUR_OAUTH_TOKEN
@yashasolutions
yashasolutions / .tridactylrc
Last active October 19, 2022 08:58
Ala Doom Emacs Tridaty config for Firefox
" vim: set filetype=tridactyl
"""" Tridactyl config - yasha.solutions
"""" This is mostly a mod based on a mix of Doom Emacs and vim old habits
"""" The general idea of this config is to create a unified experience between
"""" Emacs and Firefox which are my main daily driver
"""" This is supported by a good i3wm config which help glue the missing parts
"""" This is obviously a work in progress but I thought i'd made a snapshot
" Uncomment the lines you want to keep then move this file to

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

hugo-worflow-notes

  • Easy Hugo Mode https://github.com/masasam/emacs-easy-hugo Basically it is a very handy cms inside emacs BUT it is not an improvement of the workflow

    see, writing a post is not a linear process that happen only when you are writing a post, it happens all the time, when you are working and you need something that you can capture or marked some of these thoughts that happen while you work