Skip to content

Instantly share code, notes, and snippets.

View RaviPabari's full-sized avatar
💻
Learning

Ravi Pabari RaviPabari

💻
Learning
View GitHub Profile
@cutiko
cutiko / Readme.md
Created November 22, 2019 18:24
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

@nistath
nistath / terminator.vbs
Last active February 19, 2023 22:15 — forked from ropnop/startTerminator.vbs
Script to start terminator on WSL from CMD or PowerShell
' Usage: terminator[.vbs] [path to starting directory]
' contents enclosed in square brackets optional
args = "-c" & " -l " & """DISPLAY=:0 terminator"""
' If there's a single argument, interpret it as the starting directory
If WScript.Arguments.Count = 1 Then
dir = WScript.Arguments(0)
Else
dir = ""
@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active April 25, 2024 20:53 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@tuananh
tuananh / check-mime-type-from-base64-string-node.js
Created April 7, 2018 14:33
Check mime type from base64 string in Node.js
const fileType = require('file-type')
const base64String = 'iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAYAAAA6GuKaAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAhOAAAITgBRZYxYAAAABxpRE9UAAAAAgAAAAAAAAAXAAAAKAAAABcAAAAWAAABW85tpoQAAAEnSURBVGgF7JbLDYMwDIYZoSN0pI7QUdikI+QESAXJozACR6SCRO2IHIBgnIRHKhUpQsSO/fFjnCRJwDWAun3exbOvsldX5oBjYAaQH/nTuoC0fkv7Kn8gnGIAOXhjUxTHj8BhFSXBUQfCGmh9p3iHwLdFcUdQ2BPWEgsoj4OG665Ug5igsSSZKLaTvaF86zQCS1dm6U4wji+YpQK8pcvYERyTsd3DKRblX1IxM9cpPH9poeJjDTupcmQJbdb42CXO+umkwjRsV0HF4EjVAmKDtZqpwQcElarm7WfdgGhnihy6nqgdu8pGzInaOBl6+PH+7AZIeFdabTomChecBcbm0cfa2PryloC6b1+9XW9Bzu16e8dJmBsif4YkckBrff+hz/pqP6n0FwAA//85LScuAAAA+0lEQVTV1u0NgyAQBuAboSN0pI7QUdykI/ALSaoJozgCP5tUE8tL0FiQSNNWORM/IEQfLucB9U09cjuJGxhetmjNLNqahlbeOKHhpeddXTmh4aVRixMnNLyEw6IFE7hwYFyGtr5wQMM5oz28Kxluwd0b2KOLjnYU5WkGNtKl1mw9GaP7Q6mzhZvC0sTAFWGXHaXVbVeXl8DUc9/IqoxoyyplXO0/enl3y/WqbKPzuIh/GOFwHj7H9/o5TXYOh9Cw7avKv8uh3qwSISynjQKPlemXPynel1w4clC5Y/ARC/92kyV2wYaTwjYROegrzVb6aIzD+Hl7Gb4ws/0Cqd8IYgt7isgAAAAASUVORK5CYII='
const mimeInfo = fileType(Buffer.from(ba
@ropnop
ropnop / startTerminator.vbs
Created September 29, 2017 00:02
VBS Script to Launch Terminator through WSL
args = "-c" & " -l " & """DISPLAY=:0 terminator"""
WScript.CreateObject("Shell.Application").ShellExecute "bash", args, "", "open", 0
@matthewjberger
matthewjberger / instructions.md
Last active April 25, 2024 08:15
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache