git config --global alias.tree "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
git tree
* c3aee36 - (HEAD -> master, tag: DAY01, origin/master, origin/HEAD) '' (2 minutes ago) <r-lyeh>
* 5c978e9 - Initial commit (4 minutes ago) <r-lyeh>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XLSX exporter v1.01. (tags: xlsx, ini, c++11, i18n, L10n) | |
// - rlyeh, public domain | |
// This tool exports given xlsx: | |
// | |
// ._______._____ | |
// |sheet1 \ ... \ | |
// |--------------------------------------------------- | |
// 1| LABEL | NOTES | ENGLISH | SPANISH | ... | |
// |----------+----------+-----------+-----------+----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from PolyGlot master sheet 0.9 - CC1.0 licensed | |
// https://github.com/PolyglotGamedev/mastersheet/blob/master/PolyglotGamedev-Master.csv | |
enum { | |
comment, | |
enUS/*enGB*/,frFR, | |
esES/*esAR esMX*/, | |
deDE/*deCH deAT*/, | |
itIT/*itCH*/, | |
ptBR,ptPT,ruRU,elGR,trTR,daDK,noNB,svSE,nlNL,plPL,fiFI,jaJP,zhCN/* zhSG*/,zhTW/* zhHK zhMO*/,koKR,csCZ,huHU,roRO,thTH,bgBG,heIL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Mike F */ | |
#include <stdint.h> | |
void *memalign( int align, size_t size ) { | |
void *mem = malloc( size + (align-1) + sizeof(void*) ); | |
if(!mem) return 0; | |
char *amem = ((char*)mem) + sizeof(void*); | |
amem += (align - ((uintptr_t)amem & (align - 1)) & (align-1)); | |
((void**)amem)[-1] = mem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Testing read file speed for the three read functions from | |
http://cpp.indi.frih.net/blog/2014/09/how-to-read-an-entire-file-into-memory-in-cpp/ | |
compile with -std=c++11 | |
*/ | |
#include <type_traits> | |
#include <ostream> | |
#include <sstream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [src] https://github.com/apfeltee/cpp11-sprintf | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
std::string fmt( const char *format ) { | |
return format ? format : ""; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
#include <utility> | |
void internal_func(const std::string& s) | |
{ | |
std::cout << s << '\n'; | |
} | |
template <typename ... T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// another small variant class | |
// - rlyeh, public domain | |
#pragma once | |
#include <string> | |
#include <sstream> | |
template< typename T > | |
inline T as( const std::string &self ) { | |
T t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
int main( int argc, const char **argv ) { | |
if( argc >= 3 ) { | |
float cycle = atof(argv[1]); | |
float distance = atof(argv[2]); | |
float excess = fmodf( distance, cycle ); |
NewerOlder