Skip to content

Instantly share code, notes, and snippets.

View slurpyb's full-sized avatar

Jordan slurpyb

  • Perth, Western Australia
  • 14:55 (UTC +08:00)
View GitHub Profile
@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 ''
@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)
*
@mortie
mortie / chrono-cheat-sheet.md
Last active December 25, 2025 06:50
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