Skip to content

Instantly share code, notes, and snippets.

View tushargoyalofficial's full-sized avatar
🔬
अनुगच्छतु प्रवाहं

TUSHAR GOYAL tushargoyalofficial

🔬
अनुगच्छतु प्रवाहं
View GitHub Profile
@tushargoyalofficial
tushargoyalofficial / docker-compose.yaml
Last active October 7, 2025 16:55
Postgres Docker Persistant
services:
postgres:
image: postgres:18-alpine
container_name: donkey_postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: donkey_db
ports:
- "6434:5432"
@tushargoyalofficial
tushargoyalofficial / pure.omp.json
Created January 10, 2025 08:10
oh-my-post pure config to show python env
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"transient_prompt": {
"template": "❯ ",
"foreground": "#B48EAD",
"foreground_templates": ["{{ if gt .Code 0 }}#BF616A{{ end }}"]
},
"console_title_template": "{{if .Root}}(Admin){{end}} {{.PWD}}",
"blocks": [
{
@tushargoyalofficial
tushargoyalofficial / gist:f6790ee7939cd538b131626e3ed0d50c
Created December 14, 2023 16:02
Arch Linux run docker without sudo
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker (Log in to the new docker group (to avoid having to log out / log in again; but if not enough, try to reboot):)
docker run hello-world (check it)
@tushargoyalofficial
tushargoyalofficial / clean_structure.sh
Last active October 12, 2023 08:12
Flutter Clean Structure Shell Script to create dirs
#!/usr/bin/bash
echo "Hello there, let's create clean structure for Flutter apps."
# Take user input to initialize new clean structure.
read -r -p "Initialize new Clean Structure [y/N]: " clean_struct
user_input=${clean_struct:-N}
if [[ $user_input == 'y' || $user_input == 'Y' ]]; then
# Check if lib dir exists or not.
@tushargoyalofficial
tushargoyalofficial / App.tsx
Created July 25, 2023 14:51
Flexiple - Code Sample
import {
NavigationContainer,
useNavigationContainerRef
} from '@react-navigation/native'
import { ThemeProvider } from '@shopify/restyle'
import { useFonts } from 'expo-font'
import * as Linking from 'expo-linking'
import * as SplashScreen from 'expo-splash-screen'
import { StatusBar } from 'expo-status-bar'
import * as React from 'react'
Windows 11 WSL2 Port forwarding (Bridge) to access server running on wsl2 linux over LAN network by other devices\
listenport should be one on which your node server or services or app works on, forward the same for other device to access
on every restart, WSL2 host IP address changes, so need to delete them and again add new one
All below commands only work in terminal app with admin priveledges.
# netsh interface portproxy add v4tov4 listenport=19001 listenaddress=192.168.1.5 connectport=19001 connectaddress=$($(wsl hostname -I).Trim());l hostname -I).Trim());
# netsh interface portproxy show v4tov4
{
"editor.fontSize": 18,
"editor.fontFamily": "Cascadia Code, 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontWeight": "500",
"editor.lineHeight": 34,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 80,
"editor.fontLigatures": "'calt', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', 'onum'",
"editor.cursorBlinking": "expand",
"editor.cursorSmoothCaretAnimation": true,
@tushargoyalofficial
tushargoyalofficial / .zshrc
Created February 3, 2022 09:48
Environment Path variables for setting up Android SDK, Java for further development with RN/Flutter
DEV_TOOLS="/home/$USER/DevTools"
JAVA_HOME="$DEV_TOOLS/JDK/jdk-11.0.12+7"
ANDROID_HOME="$DEV_TOOLS/Android/Sdk"
export JAVA_HOME
export ANDROID_HOME
PATH="$JAVA_HOME/bin:$PATH"
PATH="$ANDROID_HOME/cmdline-tools/tools/bin:$PATH"
@tushargoyalofficial
tushargoyalofficial / neovim-postinstall
Last active December 29, 2021 09:49
Neovim Setup
npm i -g vscode-langservers-extracted pyright yaml-language-server stylelint-lsp dockerfile-language-server-nodejs vscode-langservers-extracted graphql-language-service-cli typescript typescript-language-server
# Init.lua file (Neovim)
# Location: ~/.config/nvim/lua/plugins/configs/lspconfig.lua
local nvim_lsp = require('lspconfig')
local servers = {
'html',
@tushargoyalofficial
tushargoyalofficial / config.plist
Created November 14, 2020 11:46
Open Core Config for HP Pavilion P077-TX Core i5 4210U Haswell
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
<array>
<dict>
<key>Comment</key>