Skip to content

Instantly share code, notes, and snippets.

View slurpyb's full-sized avatar

Jordan slurpyb

  • Perth, Western Australia
  • 23:03 (UTC +08:00)
View GitHub Profile
@mortie
mortie / chrono-cheat-sheet.md
Last active October 10, 2025 14:08
std::chrono cheat sheet for the every-day programmer

Chrono cheat sheet

For the every-day programmer who needs to get shit done instead of fighting type errors.

If your application deals with times in any meaningful way, you should probably want to actually store time_points and durations and what-not; chrono has a pretty rich vocabulary for talking about time-related concepts using the type system. However, sometimes you just need to do something simple, like timing how long something takes, which is where chrono becomes overly complex, hence this cheat sheet.

All examples will assume #include <chrono>.

I just want to time something, then print the result

@monsterbrain
monsterbrain / space_invaders_raylibgame.c
Created December 28, 2018 17:32
Raylib Space Invader Game Tutorial Full source Code. Made for this blogpost. https://monsterbraininc.com/2018/12/raylib-game-tutorial-space-invaders-using-vscode/
/*******************************************************************************************
*
* raylib - sample game: space invaders
*
* Based on Sample game developed by Ian Eito, Albert Martos and Ramon Santamaria
* Modifed by Monster Brain (monsterbraininc.com) - 2018
*
* This game has been created using raylib v1.3 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
@Nuttymoon
Nuttymoon / Vagrantfile
Last active September 5, 2019 00:37
Vagrantfile to test libvirt install
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = "centos/7"
if Vagrant::VERSION == '1.8.5'
ui = Vagrant::UI::Colored.new
ui.error 'Unsupported Vagrant Version: 1.8.5'
ui.error 'Version 1.8.5 introduced an SSH key permissions bug, please upgrade to version 1.8.6+'
ui.error ''
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@francoisromain
francoisromain / project-create.sh
Last active June 14, 2024 09:55
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# source: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# and another script to delete the directories created by this script
# project-delete.sh: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# Call this file with `bash ./project-create.sh project-name`
# - project-name is mandatory
# This will creates 4 directories and a git `post-receive` hook.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@samsheffield
samsheffield / UnityCodingCheatSheet.txt
Last active October 27, 2025 21:28
Unity C# Cheat Sheet
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@dineshviswanath
dineshviswanath / python_web_dev_flask_environment_setup.md
Last active April 29, 2025 08:19
How to install python and Flask on Mac OS X

#Starting Python Web development in Mac OS X#

Objective: Getting started with Python Development Operating System: Mac OS X Python version installed: 3.5 (5th December 2015)

Downoad the lastest Python from https://www.python.org/downloads/

@DraTeots
DraTeots / ComPort over Network.md
Last active October 21, 2025 19:04
ComPort over Network
@eatonphil
eatonphil / functions.c
Last active September 4, 2025 13:41
Introduction to "Fun" C (using GCC)
/**
* This are a collection of examples for C 201.
* These combine concepts you may or may not be
* familiar with and are especially useful for
* students new to C. There is a lot of really
* cool stuff you can do in C without any cool
* languages.
*
* This is file in particular is an introduction
* to fun function usage in C.