Skip to content

Instantly share code, notes, and snippets.

View nikhiljainlive's full-sized avatar
🎯
Focusing

Nikhil Jain nikhiljainlive

🎯
Focusing
View GitHub Profile

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

exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@nikhiljainlive
nikhiljainlive / README.md
Created February 1, 2021 10:09 — forked from CodingDoug/README.md
How to schedule a Cloud Function to run in the future (in order to build a Firestore document TTL)
@nikhiljainlive
nikhiljainlive / android-up.txt
Created January 7, 2021 05:46 — forked from ichux/android-up.txt
Frida on Android
# https://joshspicer.com/android-frida-1
1. Find CPU type
adb shell getprop ro.product.cpu.abi
2. If it's arm64-v8a, for instance, download
frida-server-12.6.11-android-arm64.xz [notice the arm64 in the server download]
3. Extract frida-server-12.6.11-android-arm64.xz and
adb push frida-server-12.6.11-android-arm64 /data/local/tmp/frida-server
@nikhiljainlive
nikhiljainlive / Singletons.md
Created December 21, 2020 13:17 — forked from Razeeman/Singletons.md
Thread safe singleton implementations in java and kotlin.

Java

Not thread safe.

class SimpleSingleton {
    private static SimpleSingleton sInstance;
  
    private SimpleSingleton() {}
 
@nikhiljainlive
nikhiljainlive / encrypt_img_ecb.sh
Created November 5, 2020 12:43 — forked from patrickfav/encrypt_img_ecb.sh
Encrypt .ppm file with AES-ECB to show ECB will reveal patterns
#!/bin/sh
# This is part of my blog about AES: https://medium.com/p/7616beaaade9
# Inspired by https://blog.filippo.io/the-ecb-penguin/
# Convert your image to .ppm with Gimp or Photoshop
#
# Usage: ./ecb_img <image file as ppm> <password>
# extract header and body
@nikhiljainlive
nikhiljainlive / git-change-commit-messages.md
Created February 19, 2020 06:07 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.