Skip to content

Instantly share code, notes, and snippets.

View pnchinmay's full-sized avatar
:octocat:

Chinmay pnchinmay

:octocat:
View GitHub Profile
@JoelWi
JoelWi / java.lua
Last active January 6, 2025 08:11
local java_cmds = vim.api.nvim_create_augroup('java_cmds', {clear = true})
local cache_vars = {}
local root_files = {
'.git',
'mvnw',
'gradlew',
'pom.xml',
'build.gradle'
}
@phortuin
phortuin / signing-git-commits.md
Last active April 17, 2025 04:39
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@Konfekt
Konfekt / scope.sh
Last active September 27, 2024 19:37
scope.sh for text preview of office documents in ranger file manager (using .mailcap file from https://gist.github.com/Konfekt/9797372146e65a70a44c1e24a35ae0a2)
#!/usr/bin/env bash
# Uses ~/.mailcap from https://gist.github.com/Konfekt/9797372146e65a70a44c1e24a35ae0a2
# to read binary files
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
for (const button of document.getElementsByClassName('artdeco-button--secondary')) button.click();
@CaesarOG
CaesarOG / !LaTeX.MD
Last active May 10, 2024 01:06
LaTeX w/ VimTex, UltiSnips and Zathura

How to prepare for technical interviews at companies like Amazon, Flipkart, Google, Microsoft, Swiggy, Uber, etc?

Interview Rounds

Generally, there are two major types of technical interviews that companies have in India:

  • Problem Solving & Data Structures Round
  • Machine Coding Round

If you're aiming the traditional giants like Google, Microsoft, Amazon, etc, then you should focus solely on problem-solving & data structures (PS/DS).

@elsholz
elsholz / i3wm_media_lock.md
Last active January 15, 2023 10:58
How to create a transparent lock screen in i3wm. Locks screen, but shows no lock screen. Unlocks as usual, if correct password is entered.

i3wm Transparent Lock screen.

Warning: If executed multiple times, unlock isn't possible anymore, use with caution!

Description

Block computer for input, but remain graphical output as usual. Can be used for example to watch a movie on your laptop but forbid any input during that.

Downside

Not tested thouroughly yet, and only tested on Debian 9

@kdevo
kdevo / i3wm-tricks.md
Last active September 25, 2024 13:00
i3wm: Tricks to assign "problematic" applications to a specific workspace/layout.

i3 Window Manager Tips and Tricks

...to assign applications to a specific workspace/layout.

i3wm makes it easy to assign applications to workspaces and save and restore layouts - which is e.g. useful for auto-starting always needed software. To make these assignments, you need specific window properties so that you can tell i3 to assign [class="Your-app"] → 1 (in this example, Your-app will be assigned to workspace 1).

In many cases this just works. However, there are also many popular programs that do not initially set the correct window class or other properties on startup, which can be frustrating. This cheat sheet aims to show the problems and possible resolutions (or worse: workarounds) for more or less problematic applications.


@gaearon
gaearon / modern_js.md
Last active April 14, 2025 19:22
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@MWins
MWins / project-ideas01.md
Last active April 13, 2025 09:57
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.