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 November 1, 2024 05:07
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 29, 2022 05:53
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

@sjvnnings
sjvnnings / better_jumping_character_example.gd
Last active November 2, 2024 02:10
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";
@fnky
fnky / ANSI.md
Last active November 19, 2024 18:05
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@johnjohndoe
johnjohndoe / download-url-to-file.rb
Last active March 14, 2024 17:58
Ruby script to download a number of files from individual URLs via HTTP/HTTPS/FTP specified in an external file.
#!/usr/bin/env ruby
#
# Ruby script to download a number of files
# from individual URLs via HTTP/HTTPS/FTP
# specified in an external file.
#
# Author: Tobias Preuss
# Revision: 2013-04-18 16:26 +0100 UTC
# License: Creative Commons Attribution-ShareAlike 3.0 Unported
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no