Skip to content

Instantly share code, notes, and snippets.

View unkcpz's full-sized avatar
🎯
Focusing

Jusong Yu unkcpz

🎯
Focusing
View GitHub Profile
@gabrieldlima
gabrieldlima / NixOS-raylib.md
Last active September 15, 2025 15:33
Raylib development environment in Nix/NixOS

Nix/NixOS raylib setup

  1. Begin by downloading the latest stable release of raylib into your project folder. Use the following commands:
cd your-project-folder
mkdir external
wget https://github.com/raysan5/raylib/archive/refs/tags/5.5.tar.gz -P external/
tar xvf external/5.5.tar.gz -C external/
@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active November 1, 2025 06:03
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@RobBlackwell
RobBlackwell / configuration.nix
Last active May 29, 2025 23:51
NixOS on Dell XPS 13
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@gilyes
gilyes / Backup, restore postgres in docker container
Last active October 4, 2025 11:26
Backup/restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@ngauthier
ngauthier / timeout_and_tick.go
Created February 10, 2015 18:14
Golang timeout and tick loop
// keepDoingSomething will keep trying to doSomething() until either
// we get a result from doSomething() or the timeout expires
func keepDoingSomething() (bool, error) {
timeout := time.After(5 * time.Second)
tick := time.Tick(500 * time.Millisecond)
// Keep trying until we're timed out or got a result or got an error
for {
select {
// Got a timeout! fail with a timeout error
case <-timeout:
@timdream
timdream / gist:5968469
Last active May 25, 2024 16:56
Github 發 Pull Request & 貢獻流程速查

Github 發 Pull Request & 貢獻流程速查

前言

此文目標讀者需先自行學會

  • 開 Github 帳號
  • 會 fork 程式 repository
  • 會在自己的電腦使用命令列 git
  • 會 clone 自己的 repository