Skip to content

Instantly share code, notes, and snippets.

View NNBnh's full-sized avatar
⚠️
TypeError: Cannot read property 'status' of undefined.

NNB NNBnh

⚠️
TypeError: Cannot read property 'status' of undefined.
View GitHub Profile
@sebastiancarlos
sebastiancarlos / silence-autocd.sh
Last active November 15, 2024 07:55
Hack to suppress the default output of autocd in Bash.
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/shorts/ojhaUNYetsU
shopt -s autocd
# silence_autocd
# - Hack to stop autocd from printing the directory after autocd'ing.
# - Unfortunately there is no clean way to do this except messing with
# BASH_XTRACEFD, a poorly understood file descriptor that we are better not
@huytd
huytd / wordle.md
Last active April 1, 2025 00:28
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@K4zoku
K4zoku / screenshot.sh
Last active January 14, 2022 09:40
A small script to perform basic screenshot operations on x11 and wayland
#!/usr/bin/env sh
##########################################################################################
# #
# ███████╗ ██████╗██████╗ ███████╗███████╗███╗ ██╗███████╗██╗ ██╗ ██████╗ ████████╗ #
# ██╔════╝██╔════╝██╔══██╗██╔════╝██╔════╝████╗ ██║██╔════╝██║ ██║██╔═══██╗╚══██╔══╝ #
# ███████╗██║ ██████╔╝█████╗ █████╗ ██╔██╗ ██║███████╗███████║██║ ██║ ██║ #
# ╚════██║██║ ██╔══██╗██╔══╝ ██╔══╝ ██║╚██╗██║╚════██║██╔══██║██║ ██║ ██║ #
# ███████║╚██████╗██║ ██║███████╗███████╗██║ ╚████║███████║██║ ██║╚██████╔╝ ██║ #
# ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ #
@nberlette
nberlette / SvelteKit_vs_NextJS.md
Last active March 27, 2025 19:02
Svelte vs. Next.js

SvelteKit 🆚 Next.js

Objectives: fast, easy, convention over configuration, & batteries included. Overwhelming choices < providing a clear path forward.

Contenders: [SvelteKit][sveltekit-url] (by [Svelte][svelte-url]) and [Next.js][next-url] (by [Vercel][vercel-url]).


Comparison of Major Features

@th3hamburgler
th3hamburgler / app.css
Created July 26, 2021 15:51
Tailwind safe area inset utilities
@layer utilities {
/* extra helper classes to account for mobile safe areas */
.p-safe {
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.px-safe {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
@sjvnnings
sjvnnings / better_jumping_character_example.gd
Last active April 17, 2025 20:26
An easy to work with jump in Godot
extends KinematicBody2D
export var move_speed = 200.0
var velocity := Vector2.ZERO
export var jump_height : float
export var jump_time_to_peak : float
export var jump_time_to_descent : float
@sjvnnings
sjvnnings / CustomProximityGroup.gd
Created June 25, 2021 01:12
An Area node that mimics the functionality of Godot's ProximityGroup, without it's drawbacks and confusing documentation.
extends Area
class_name CustomProximityGroup
signal broadcast(method_name, params)
enum dispatch_modes{
PROXY,
SIGNAL
}
@adamdehaven
adamdehaven / vs-code-custom-font.md
Created February 7, 2020 19:06
VS Code Custom Font without Font Install Privileges

VS Code Custom Font without Font Install Admin Privileges

  1. Open Help -> Toggle Developer Tools in the menu (Ctrl + Shift + I)
  2. Paste JavaScript code below into the Console and execute.
    var styleNode = document.createElement('style'); 
    styleNode.type = "text/css"; 
    var styleText = document.createTextNode(`
        @font-face {
            font-family: "Fira Code";
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 18, 2025 18:48
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@fnky
fnky / ANSI.md
Last active April 18, 2025 14:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27