Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View SocketByte's full-sized avatar
🤔
Trying to be a better programmer, I guess

Adam Grzegorzewski SocketByte

🤔
Trying to be a better programmer, I guess
  • Grupa IMAGE, Itelix Software
  • Poland, Warsaw
View GitHub Profile
@SocketByte
SocketByte / snake.c
Created January 15, 2022 14:30
Simple bare-bones C snake implementation for POSIX.
#include <poll.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
/* Base configuration definitions to avoid magic values */
@SocketByte
SocketByte / arch-install.sh
Last active July 13, 2021 07:25
Arch Script Installer (for my personal use, but it's pretty configurable)
#!/usr/bin/env bash
set -e
# Configuration
# Partitioning
DEVICE="/dev/sdd" # Please make sure it's correct, the script won't ask you for any confirmation.
FIRMWARE_MODE=auto # uefi, bios, auto
SWAP_SIZE=4096MiB
# Time and date
{"contents":{"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"launch","name":"Launch via NPM","runtimeExecutable":"npm","runtimeArgs":["run-script","debug"],"port":9229},{"type":"node","request":"attach","name":"Attach to Remote","address":"localhost","port":9229,"localRoot":"${workspaceFolder}","remoteRoot":"${workspaceFolder}/backend/dist/index.js"},{"type":"node","request":"launch","name":"Launch Program","program":"${workspaceFolder}/backend/src/config/socket.io.ts","outFiles":["${workspaceFolder}/**/*.js"]}]}},"overrides":[],"keys":["launch.version","launch.configurations"]}
@SocketByte
SocketByte / bad_apple_visualization.go
Last active January 2, 2023 03:26
Bad Apple Visualization in a Console Terminal
package main
import (
"fmt"
"github.com/faiface/beep/mp3"
"github.com/faiface/beep/speaker"
"image"
"image/color"
"image/jpeg"
"io/ioutil"