Skip to content

Instantly share code, notes, and snippets.

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

Dhaval Parmar TechGeekD

👨‍💻
Debugging Life
View GitHub Profile
**Steps to setup WSL with NodeJS, Yarn & SSH**
(NOTE: use elevated powershell)
You must ensure that the "Windows Subsystem for Linux" optional feature is enabled. To do this:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Download & Install:
@TechGeekD
TechGeekD / interface.ts
Last active February 3, 2020 12:22
interfaces for typescript
export interface StringTMap<T> { [key: string]: T; };
export interface NumberTMap<T> { [key: number]: T; };
export interface StringAnyMap extends StringTMap<any> {};
export interface NumberAnyMap extends NumberTMap<any> {};
export interface StringStringMap extends StringTMap<string> {};
export interface NumberStringMap extends NumberTMap<string> {};
export interface StringNumberMap extends StringTMap<number> {};
@TechGeekD
TechGeekD / delete_till_specific_commit.txt
Created April 18, 2019 08:44
Delete commits till specific commit id from git history
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 7bab42f7e8dc52aa7a6ac86cb35170dc689670e8
# Then do a forced update.
git push origin +7bab42f7e8dc52aa7a6ac86cb35170dc689670e8^:CAT-3902
# Push specific commit
git push origin 7bab42f7e8dc52aa7a6ac86cb35170dc689670e8:CAT-3902
@TechGeekD
TechGeekD / amend_specific_commit.txt
Created April 18, 2019 08:42
Git rebase to amend specific commit
git rebase -i --root
* change the lines for commit from pick to edit (gitbash: press inster then update file after that :wq to save & quite file)
* Once the rebase started, it would first pause at edit commit
* you can ammend that specific commit now
git commit --amend --author="Author Name <email@address.com>"
git rebase --continue
* The rebase would complete after pausing at each edit commit
By adb shell input keyevent, either an event_code or a string will be sent to the device.
usage: input [text|keyevent]
input text <string>
input keyevent <event_code>
Some possible values for event_code are:
0 --> "KEYCODE_UNKNOWN"
1 --> "KEYCODE_MENU"
@TechGeekD
TechGeekD / React-Native Shell Script.sh
Last active June 14, 2021 17:25
Shell Script for React-Native Commands i.e. run pakcakge or run on platform
#!/bin/bash
# * Description:
# * Script for React-Native Commands i.e. run pakcakge, run on platform or reload app
# *
# * Usage:
# * $ ./run.sh [param1 [param2 [param3]]]
# *
# * param1 (optional):
# * - 'r' or 'p' for silent run [if passed script will run in silent mode]