Skip to content

Instantly share code, notes, and snippets.

View aashutoshrathi's full-sized avatar
👨‍💻
Baking Code

Aashutosh Rathi aashutoshrathi

👨‍💻
Baking Code
View GitHub Profile
@PashCracken
PashCracken / WSL-with-zsh-and-powerlevel9k.png
Last active September 4, 2023 07:28
WSL, zsh and Powerlevel10k
WSL-with-zsh-and-powerlevel9k.png
@bvaughn
bvaughn / profiling-a-chrome-extension.md
Last active February 21, 2024 05:46
Profiling a custom Chrome extension

Chrome's profiler ("Performance tab) is very useful for measuring JavaScript performance, but what if you want to measure the performance of a custom extension?

For example, what if I would like to profile the following interaction:


The interaction we want to profile


Linux Tricks

  • Use cd $_ to get into previous arguement Eg:
mkdir folder-name && cd $_
using namespace std;
#include <bits/stdc++.h>
#define trace(x) cout<<#x<<": "<<x<<" ";
int solve(string s, int n, int k)
{
if(n == 0)
return s[k];
int skip = k/((int)pow(2, n));
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active August 15, 2025 11:44
crack activate Office on mac with license file
@felipeochoa
felipeochoa / quill-blots.org
Created January 13, 2018 17:13
Notes to self on blots in quill

Quill Blots

There are four options for creating a custom blot:

---------------+-------+

InlineBlock

---------------+-------+

Embed

---------------+-------+

Text
@aashutoshrathi
aashutoshrathi / didYouMean.js
Last active December 26, 2017 11:50
Get the Google's Did you mean text using console.
// one way searching through italics tag
x = document.getElementsByTagName('i');
x[0].innerText // ==> it will give you correct output
// searching through class
x = document.getElementsByClassName('spell');
x[1].children[0].textContent // ==> it will give same result too.
// This works for links like https://www.google.co.in/search?q=summr
// Gives an output summer
@mort3za
mort3za / git-auto-sign-commits.sh
Last active July 22, 2025 02:23
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@tclavier
tclavier / find-oldest-line
Created July 24, 2017 07:27
Find oldest line in git repo
#!/bin/bash
for file in $(find . -type f);
do
git blame --date=format:%Y%m%d $file
done | sed -e 's/.*\s\([0-9]\{8\}\)\s.*/\1/' | sort -r | tail
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 16, 2025 02:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example