Skip to content

Instantly share code, notes, and snippets.

@mantognini
mantognini / build_package.sh
Last active May 9, 2018 05:49
Packaging script for SFML 2.x & CSFML 2.x
#!/bin/sh
VERSION="2.5.0"
VERSION_C="2.5"
BUILD_CSFML=FALSE
# BUILD_CSFML=TRUE
@imneme
imneme / randutils.hpp
Last active March 28, 2024 20:43
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Melissa E. O'Neill
*
@TankOs
TankOs / gist:a95fe1cb1ab9ebe36a03
Created October 9, 2014 07:25
Conversion script.
#!/bin/zsh
dos2unix **/*
sed -i "/class/b; /struct/b; /\?/b; /:)/b; / ::/b; /@interface/b; /:=/b; s/\([^)]\) \+:/\1:/g" **/*.hpp **/*.cpp **/*.mk **/*.mm **/*.h **/*.txt **/*.inl **/*.cmake
git checkout extlibs
git checkout src/SFML/Graphics/stb_image
@tibordp
tibordp / variant.cc
Last active November 14, 2023 16:04
A simple variant type implementation in C++
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <string>
template <size_t arg1, size_t ... others>
struct static_max;
template <size_t arg>
@mantognini
mantognini / build_head.sh
Last active May 9, 2018 05:34
Create SFML and CSFML 2.x packages for macOS.
#!/bin/sh
###
### Build SFML head for OS X, current OS version only
###
### Author: Marco Antognini <antognini.marco@gmail.com>
### Date: 24/07/2013
###
##
@shazron
shazron / gist:943736
Created April 27, 2011 04:55
About XCode 4 Project Template (How To Create Custom Project Template)
From: http://snipt.net/yonishin/about-xcode-4-project-template
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates
Examples:
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate