Skip to content

Instantly share code, notes, and snippets.

View affanshahid's full-sized avatar

Affan Shahid affanshahid

View GitHub Profile
@affanshahid
affanshahid / overlay-indices.rs
Last active May 2, 2023 09:00
Overlay indices on a spritesheet
use std::{env, path::Path};
use image::{open, Rgb};
use imageproc::drawing::draw_text_mut;
use rusttype::{Font, Scale};
fn main() {
let arg = env::args().nth(1).expect("Please provide a valid path");
let sprite_width: i32 = env::args()
.nth(2)
@affanshahid
affanshahid / viper-like-node-config.go
Last active November 2, 2024 20:07
Using spf13/viper like node-config
package main
import (
"fmt"
"os"
"strings"
"github.com/spf13/viper"
)