Skip to content

Instantly share code, notes, and snippets.

View andostronaut's full-sized avatar
🛰️
on orbit

Ando Ramanamihanta andostronaut

🛰️
on orbit
View GitHub Profile
@andostronaut
andostronaut / auto-assign.yml
Created July 27, 2023 16:10
GitHub Workflow : Auto Assign
name: Auto Assign
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions:
@andostronaut
andostronaut / app.tsx
Last active July 27, 2023 16:10
Using DeepReadonly, we cannot mutate anything in the entire tree, preventing a whole range of bugs that could occur.
export function EditEvent() {
const [event, setEvent] = useState<DeepReadonly<Event>>()
// ...
// ❌
event.attendees.push('foo') // Error
// ✅
setEvent({
...event,
@deepanchal
deepanchal / starship.toml
Last active November 2, 2024 19:22
Starship config
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$username\
$hostname\
$localip\
$shlvl\
$singularity\
$kubernetes\
@davidteren
davidteren / nerd_fonts.md
Last active October 27, 2025 21:58
Install Nerd Fonts via Homebrew [updated & fixed]
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}
@mattbeiswenger
mattbeiswenger / README.md
Last active September 2, 2023 12:55
How to Close an Open Port in Unix

How to Close an Open Port in Unix

  1. Type the following command to list all ports listening for a connection lsof -i -P -n | grep LISTEN

  2. Find the process you would like to terminate

redis-server 1913 mbeiswenger 6u IPv4 0x395e893ba0f300d5 0t0 TCP *:6379 (LISTEN)

  • sshd is the name of the application
@lukas-h
lukas-h / license-badges.md
Last active October 20, 2025 22:24
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@guilherme
guilherme / gist:9604324
Last active October 10, 2024 18:27
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then