Skip to content

Instantly share code, notes, and snippets.

View boodahDEV's full-sized avatar
💻
what up? 💻

boodah boodahDEV

💻
what up? 💻
View GitHub Profile
@niw
niw / minecraft_nativeupdater_patcher.sh
Last active January 15, 2022 03:35
A simple patch script to workaround Minecraft nativeUpdater crash on macOS Monterey
#!/usr/bin/env bash
set -euo pipefail
readonly MINECRAFT_APP_PATH=/Applications/Minecraft.app
if [[ ! -d $MINECRAFT_APP_PATH ]]; then
echo "$MINECRAFT_APP_PATH is not found." >&2
exit 1
fi
@boodahDEV
boodahDEV / gotoxy_for_windows
Last active September 25, 2020 03:13
Esta función mueve el cursor de la ventana de texto a la posición según las coordenadas especificadas por los argumentos x e y. Si las coordenadas no son válidas entonces la llamada a la función gotoxy es ignorada. Los argumentos no pueden ser 0.
void gotoxy(int x,int y){
HANDLE hcon;
hcon = GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwPos; dwPos.X = x; dwPos.Y= y;
SetConsoleCursorPosition(hcon,dwPos);
}
@boodahDEV
boodahDEV / gotoxy_for_linux.c
Last active September 12, 2023 01:13
Ejemplo básico de uso del gotoxy en C. Funcional en Linux. Sin uso de la librería conio,h. Simplemente para no olvidar su codificación y demás. :D
#include<stdio.h>
//gotoxy() function definition
void gotoxy(int x,int y)
{
printf("%c[%d;%df",0x1B,y,x);
}
int main ()
{
@aras-p
aras-p / preprocessor_fun.h
Last active September 24, 2026 13:14
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,