Skip to content

Instantly share code, notes, and snippets.

View heethesh's full-sized avatar

Heethesh Vhavle heethesh

View GitHub Profile
@heethesh
heethesh / github-dark.css
Created December 30, 2018 11:49
GitHub Dark - Monokai (Customized Stylus Theme)
@-moz-document domain("githubusercontent.com"), domain("graphql-explorer.githubapp.com"), regexp("^https?://((blog|gist|guides|help|raw|resources|status|developer)\\.)?github\\.com/((?!generated_pages/preview).)*$") {
/*! Github Dark v1.20.84 (2018-11-19) */
/*! Repository: https://github.com/StylishThemes/GitHub-Dark */
/*! Userstyle: http://userstyles.org/styles/37035 */
/*! License: https://creativecommons.org/licenses/by-sa/4.0/ */
/* Override default browser styles */
button {
color: #b5b5b5 !important;
}
/* begin auto-generated rules - use tools/generate.js to generate them */
@heethesh
heethesh / bash_aliases.sh
Last active February 19, 2025 08:50
Bash Aliases
#!/bin/bash
# Bash
alias eb="sudo gedit ~/.bashrc"
alias sb="source ~/.bashrc"
alias ebal="sudo gedit ~/.bash_aliases"
alias sbal="source ~/.bash_aliases"
# Linux
alias lpwd="ls -1 | xargs readlink -f"
@heethesh
heethesh / bashrc.sh
Last active September 15, 2020 07:59
Bash RC Extensions
# Terminal logs
test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f $HOME/.terminal_logs/$(date +"%d-%b-%y_%H-%M-%S")_terminal.log)
# Same pwd new terminal tab
# Save current working dir
PROMPT_COMMAND='pwd > "${HOME}/.cwd"'
# Change to saved working dir
[[ -f "${HOME}/.cwd" ]] && cd "$(< ${HOME}/.cwd)"
# CUDA
import os
import sys
def block_printing(func):
def func_wrapper(*args, **kwargs):
# Block all printing to the console
sys.stdout = open(os.devnull, 'w')
sys.stderr = open(os.devnull, 'w')
# Function call
gsettings set com.canonical.Unity integrated-menus true
gsettings set com.canonical.Unity.Launcher favorites "['unity://running-apps', 'unity://devices', 'application://gnome-terminal.desktop', 'application://google-chrome.desktop', 'application://org.gnome.Nautilus.desktop', 'application://gedit.desktop', 'application://sublime_text.desktop', 'application://unity-control-center.desktop', 'application://gnome-system-monitor.desktop']"
@heethesh
heethesh / monokai_terminal_profile
Created April 3, 2019 21:29
Gnome Terminal Profile - Monokai Theme
[/]
foreground-color='rgb(248,248,242)'
palette=['rgb(39,40,34)', 'rgb(249,38,114)', 'rgb(117,158,34)', 'rgb(253,151,31)', 'rgb(102,217,239)', 'rgb(174,129,255)', 'rgb(230,219,116)', 'rgb(117,113,94)', 'rgb(39,40,34)', 'rgb(249,38,114)', 'rgb(166,226,46)', 'rgb(253,151,31)', 'rgb(102,217,239)', 'rgb(174,129,255)', 'rgb(230,219,116)', 'rgb(117,113,94)']
use-system-font=false
use-custom-command=false
use-theme-colors=false
use-transparent-background=true
font='Ubuntu Mono 13'
use-theme-transparency=false
bold-color-same-as-fg=true
@heethesh
heethesh / monokai.json
Last active October 29, 2020 19:09
Monokai theme for Windows Terminal
"fontFace" : "Ubuntu Mono",
"fontSize" : 12,
"colorScheme": "Monokai",
"copyOnSelect": true,
"confirmCloseAllTabs": false
"schemes":
[
{
"name": "Monokai",
@heethesh
heethesh / mailer.py
Last active May 5, 2020 09:26
Script to email the system's public IP address
#!/usr/bin/python
import smtplib
from requests import get
TO = 'TO_EMAIL_ID' ###### <---- UPDATE
FROM = 'FROM_EMAIL_ID' ###### <---- UPDATE
# Get public IP
ip = get('https://api.ipify.org').text
@heethesh
heethesh / terminator-config
Last active February 4, 2024 06:20
Terminator Config
[global_config]
dbus = False
focus = system
handle_size = 4
inactive_color_offset = 1.0
inactive_bg_color_offset = 0.6
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
[keybindings]
[profiles]
@heethesh
heethesh / ffmpeg_utils.sh
Last active September 17, 2021 23:02
FFMPEG Commands
# Convert sequences images to video
ffmpeg -f image2 -r 10 -i folder/%*.png -vb 100M -codec:v libx264 output.mp4
ffmpeg -framerate 10 -i folder/%06d.png -vb 100M -codec:v libx264 output.mp4
ffmpeg -r 10 -i folder/%06d.png -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,format=yuv420p" -codec:v libx264 output.mp4
# 2x2 grid from videos
ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -filter_complex "[0:v][1:v]hstack[top];[2:v][3:v]hstack[bottom];[top][bottom]vstack,format=yuv420p[v]" -map "[v]" output.mp4
# Horizontal stack videos
ffmpeg -i input0.mp4 -i input1.mp4 -filter_complex hstack=inputs=2 horizontal-stacked-output.mp4