Skip to content

Instantly share code, notes, and snippets.

View RicoP's full-sized avatar
🎯
Focusing

Rico P RicoP

🎯
Focusing
View GitHub Profile
@rygorous
rygorous / gist:2156668
Last active November 1, 2024 09:43
float->half variants
// float->half variants.
// by Fabian "ryg" Giesen.
//
// I hereby place this code in the public domain, as per the terms of the
// CC0 license:
//
// https://creativecommons.org/publicdomain/zero/1.0/
//
// float_to_half_full: This is basically the ISPC stdlib code, except
// I preserve the sign of NaNs (any good reason not to?)
@RicoP
RicoP / server.sh
Created June 5, 2012 10:32
simple server script
#!/bin/sh
#copy directly into /usr/bin
if [ -s /tmp/__pserver ]; then
kill `cat /tmp/__pserver`
fi
python -m SimpleHTTPServer 1>>/dev/null 2>>/tmp/log.pserver &
echo -n $! > /tmp/__pserver
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
@ocornut
ocornut / imgui_node_graph_test.cpp
Last active November 4, 2024 03:13
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().
@bkaradzic
bkaradzic / orthodoxc++.md
Last active November 19, 2024 00:29
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@SSARCandy
SSARCandy / opencv_with_cmake.md
Last active April 15, 2024 02:25
Setting up OpenCV(+extra modules) with Cmake step by step tutorial

Setting up OpenCV with Cmake GUI

  1. Download OpenCV and Cmake
  2. Build opencv with cmake image
  • Press configure, choose visual studio 2015, finish
  • Then press generate
  1. Open OpenCV.sln under build/
  2. Build it using Debug, Release
    image
/*
* Coroutines.
*
* To make a (fake) coroutine we use these macros. A coroutine method must be static,
* return bool and needs a parameter (Generator & generator).
*
* Generator must follow this schema:
* struct Generator {
* int line;
* float time;
@bkaradzic
bkaradzic / why_i_think_immediate_mode_gui_is_way_to_go_for_gamedev_tools.md
Last active October 30, 2024 03:09
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools

Prerequisites

Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
@Jobarion
Jobarion / THX.java
Last active July 9, 2023 21:07
THX Deep Note Generator
/*
MIT License
Copyright (c) 2018 Jonas Balsfulland
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@shadowmoose
shadowmoose / Gource.ps1
Last active March 13, 2021 05:58
Gource git history into MP4 format - Windows Powershell
# When run (in PowerShell), this script prompts for a directory containing a git project.
# It then jumps into that directory and uses Gource + FFmpeg to generate an mp4 animation of the history of the current branch.
# Additionally, it has support for embedding background music files. Click "Cancel" on the prompt to not add audio.
# If the video is shorter than the selected audio, the audio will fade out. If longer, the video will be sped up to fit the audio.
#
# Note: If the complementary script "handle_avatars.ps1" is present, this script will use it to download user avatars from GitHub.
# This may hit rate limiting, so ClientID and ClientSecret oAuth params are accepted, which will bypass GitHub's limits.
# You can cut down on the required queries by properly using a ".mailmap" file to combine user's emails.
# Pass "SkipGithubAvatars" to ignore this entirely, if your project is not hosted on GitHub.
#