Skip to content

Instantly share code, notes, and snippets.


Aakarshit Uppal aksh1618

View GitHub Profile
elizarov / DeepRecursiveFunction.kt
Last active Jul 13, 2021
Defines recursive function that keeps its stack on the heap (productized version)
View DeepRecursiveFunction.kt
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
* Defines deep recursive function that keeps its stack on the heap,
* which allows very deep recursive computations that do not use the actual call stack.
* To initiate a call to this deep recursive function use its [invoke] function.
* As a rule of thumb, it should be used if recursion goes deeper than a thousand calls.
* The [DeepRecursiveFunction] takes one parameter of type [T] and returns a result of type [R].

Scrcpy Shortcuts

Action Shortcut
switch fullscreen mode Ctrl+f
resize window to 1:1 (pixel-perfect) Ctrl+g
resize window to remove black borders Ctrl+x | Double-click¹
click on HOME Ctrl+h | Middle-click
click on BACK Ctrl+b | Right-click²
click on APP_SWITCH Ctrl+m
set -euo pipefail
# Here strings are noted to be faster for a small amount of
# data as compared to pipes where the setup cost dominates.
response=$(w3m -dump ""$(echo $@ | tr ' ' '+'}))
cat -s <(grep -v -e explainshell -e • -e □ -e "source manpages" <<< "$response")
dmurawsky / index.js
Last active Nov 17, 2022
How to make a page full height in Next.js
View index.js
const FullHeightPage = () => (
Hello World!
<style global jsx>{`
body > div:first-child,
div#__next > div {
height: 100%;
lopspower /
Last active Nov 28, 2022
Hexadecimal color code for transparency

Hexadecimal color code for transparency


How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

ctechols / compinit.zsh
Last active Oct 2, 2022
Speed up zsh compinit by only checking cache once a day.
View compinit.zsh
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
oshybystyi / git-auto-status.plugin.zsh
Created Jun 10, 2015
OhMyZsh plugin to display git status after a bunch of predefined git commands
View git-auto-status.plugin.zsh
# Run git status after specified set of command
# @author Oleksandr Shybystyi
# default list of git commands `git status` is running after
miguelfrde /
Last active Aug 29, 2022
Preinstalled Windows 8.1 and Arch Linux dual boot

Arch Linux installation (preinstalled Windows 8.1 dual boot)


  1. Disable Windows Fast-Startup
  2. Disable Secure Boot


JamesMGreene /
Last active Nov 23, 2022
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository