Skip to content

Instantly share code, notes, and snippets.

View hthuwal's full-sized avatar
👨‍💻
Debugging Life

Harish Chandra Thuwal hthuwal

👨‍💻
Debugging Life
View GitHub Profile
@hthuwal
hthuwal / monokai-dark.tmTheme
Created October 9, 2020 22:58
Monokai Theme
<?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>author</key>
<string>github.com/dufferzafar</string>
<key>colorSpaceName</key>
<string>sRGB</string>
<key>gutterSettings</key>
<dict>
@hthuwal
hthuwal / restore-deleted-branch.md
Created December 2, 2019 10:44
How to restore a deleted branch

How to restore a deleted branch

Problem

You accidentally deleted a branch in your Git repository.

Solution

Make sure to perform all of this locally, and confirm your repo is in the state you desire before pushing to Bitbucket Cloud. It may also be a good idea to clone your current repo, and test these solutions out first.

@hthuwal
hthuwal / steps.md
Created July 14, 2019 18:04
Watch Android videos/games on Desktop/Laptop

Watch Hotstar/JioTv/mobileVideo on Desktop/Laptop

  1. Enable USB debugging on your android.
  2. Install scrcpy on your laptop.
  3. Connect your android device and laptop:
    1. USB Cable (Video Mirroring)
    2. Bluetooth (Audio through laptop)
  4. Run scrcpy on your laptop.
  5. Play Hotstar/anything on your android device and enjoy the same on your laptop. 😄
@hthuwal
hthuwal / .zshrc
Last active September 23, 2019 10:11
zshrc
function gio() {
curl -L -s https://www.gitignore.io/api/$@ ;
}
# ############################################################################ #
# KEYS #
# ############################################################################ #
# create a zkbd compatible hash;
@hthuwal
hthuwal / steps.md
Created May 19, 2019 11:51
Resilio Sync as Normal User

Setting up resilio sync as normal user

Note: All your settings and configuration would be lost

  • Create Default Configuration file for your user
     mkdir ~/.config/rslsync
     rslsync --dump-sample-config > ~/.config/rslsync/rslsync.conf
@hthuwal
hthuwal / iitd-proxy.py
Last active May 17, 2019 09:47
IITD-Proxy Script
#!/usr/bin/env python2
import ssl
if hasattr(ssl,'_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context
import sys
import signal
import time
@hthuwal
hthuwal / list.md
Created April 27, 2019 04:48
TV Shows
├── American Gods: 2 Seasons
├── Anime
│   ├── Avatar The Last Airbender: 3 Seasons
│   ├── Death Note
│   ├── Dragon Ball
│   │   ├── 01 Dragon Ball: 6 Seasons
│   │   ├── 02 Dragon Ball Z: 9 Seasons
│   │   └── 03 Dragon Ball Super: 5 Seasons
│   ├── Full Metal Alchemist
@hthuwal
hthuwal / steps.md
Last active July 2, 2022 11:15
Setting up hybrid GPU (NVIDIA + INTEL) Manjaro

Install properietary drivers

sudo mhwd --force -a pci nonfree 0300

Add yourself to the bumblebee group

sudo gpasswd -a $USER bumblebee
@hthuwal
hthuwal / Readme.md
Last active March 18, 2019 18:07
VSCODE C++ Debugging Setup

Setup

Copy the other two files launch.json and tasks.json inside the .vscode folder.

Assumption

  • Input i.e stdin is redirected to a file in.txt in the directory where the code exists.

Lead a Life

# maximum profit at the end of the day 
# provided I am left with no energy at the end of the day
noener[i] 

# maximum profit at the end of the day 
# provided I should have maximum energy possible at the end of the day
ener[i]