Revisions
-
aras-p revised this gist
Aug 16, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,7 @@ #define else #define break #define if(x) #define double float #define volatile // this one is cool // I heard you like math -
aras-p revised this gist
Aug 16, 2013 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, // @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic, @MikeNicolella, // @AlexWDunn and myself. // Easy keyword replacement. Too easy to detect I think! @@ -46,3 +46,9 @@ #define __dcbt __dcbf // for PowerPC platforms #define __builtin_expect(a,b) b // for gcc #define continue if (HANDLE h = OpenProcess(PROCESS_TERMINATE, false, rand()) ) { TerminateProcess(h, 0); CloseHandle(h); } break // Some for HLSL shaders: #define row_major column_major #define nointerpolation #define branch flatten #define any all -
aras-p revised this gist
Aug 15, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,10 @@ // Add one of these. // Preferably into the same commit where you do a large merge. // // This started as a tweet with a joke of "C++ pro-tip: #define private public", // and then it quickly escalated into more and more evil suggestions. // I've tried to capture interesting suggestions here. // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, // @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic, @MikeNicolella -
aras-p renamed this gist
Aug 14, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aras-p revised this gist
Aug 14, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ #define else #define break #define if(x) #define volatile // this one is cool // I heard you like math #define M_PI 3.2f -
aras-p revised this gist
Aug 14, 2013 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,8 @@ // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, // @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic, @MikeNicolella // and myself. // Easy keyword replacement. Too easy to detect I think! @@ -13,6 +14,7 @@ #define else #define break #define if(x) #define volatile // I heard you like math #define M_PI 3.2f -
aras-p revised this gist
Aug 14, 2013 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, // @KarlHillesland, @rexguo, @tom_forsyth, @bkaradzic and myself. // Easy keyword replacement. Too easy to detect I think! @@ -35,7 +35,8 @@ #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+=y) // What's wrong with you people?! #define __dcbt __dcbz // for PowerPC platforms #define __dcbt __dcbf // for PowerPC platforms #define __builtin_expect(a,b) b // for gcc #define continue if (HANDLE h = OpenProcess(PROCESS_TERMINATE, false, rand()) ) { TerminateProcess(h, 0); CloseHandle(h); } break -
aras-p revised this gist
Aug 14, 2013 . 1 changed file with 18 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,24 +3,39 @@ // Preferably into the same commit where you do a large merge. // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, // @KarlHillesland, @rexguo, @tom_forsyth and myself. // Easy keyword replacement. Too easy to detect I think! #define struct union #define if while #define else #define break #define if(x) // I heard you like math #define M_PI 3.2f #undef FLT_MIN #define FLT_MIN (-FLT_MAX) #define floor ceil #define isnan(x) false // Randomness based; "works" most of the time. #define true ((__LINE__&15)!=15) #define true ((rand()&15)!=15) #define if(x) if ((x) && (rand() < RAND_MAX * 0.99)) // String/memory handling, probably can live undetected quite long! #define strcpy(a,b) memmove(a,b,strlen(b)+2) #define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b)) #define memcpy(d,s,sz) do { for (int i=0;i<sz;i++) { ((char*)d)[i]=((char*)s)[i]; } ((char*)s)[ rand() % sz ] ^= 0xff; } while (0) #define sizeof(x) (sizeof(x)-1) // Let's have some fun with threads & atomics. #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+=y) // Uh-oh. #define __dcbt __dcbz // for PowerPC platforms #define __dcbt __dcbf // for PowerPC platforms #define __builtin_expect(a,b) b // for gcc -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,3 +23,4 @@ #define InterlockedAdd(x,y) (*x+=y) #define __dcbt __dcbz // for PowerPC platforms #define __builtin_expect(a,b) b // for gcc -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,12 +10,15 @@ #define struct union #define if while #define else #define break #define if(x) #define true (__LINE__&1) #define true ((rand()&15)!=15) #define if(x) if ((x) && (rand() < RAND_MAX * 0.99)) #define strcpy(a,b) memmove(a,b,strlen(b)+2) #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+=y) -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,6 @@ #define if(x) if ((x) && (rand() < RAND_MAX * 0.99)) #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+=y) #define __dcbt __dcbz // for PowerPC platforms -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,9 @@ #define true (__LINE__&1) #define true ((rand()&15)!=15) #define strcpy(a,b) memmove(a,b,strlen(b)+2) #define if(x) if ((x) && (rand() < RAND_MAX * 0.99)) #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+y) #define __dcbt __dcbz // for PowerPC platforms -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,3 +14,6 @@ #define true (__LINE__&1) #define true ((rand()&15)!=15) #define strcpy(a,b) memmove(a,b,strlen(b)+2) #define pthread_mutex_lock(m) 0 #define InterlockedAdd(x,y) (*x+y) -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,14 @@ // Preferably into the same commit where you do a large merge. // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell, @rygorous and myself. Never let these guys // change jobs! :) #define struct union #define if while #define else #define if(x) #define true (__LINE__&1) #define true ((rand()&15)!=15) #define strcpy(a,b) memmove(a,b,strlen(b)+2) -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,8 @@ // Add one of these. // Preferably into the same commit where you do a large merge. // // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, // @YuriyODonnell and myself. Never let these guys change jobs! :) #define struct union -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ // Just before switching jobs: // Add one of these. // Preferably into the same commit where you do a large merge. // // From @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, @YuriyODonnell #define struct union #define if while -
aras-p revised this gist
Aug 13, 2013 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,10 @@ // Just before switching jobs: // Add one of these. // Preferably into the same commit where you do a large merge. #define struct union #define if while #define else #define if(x) #define true ((rand()&15)!=15) #define true (__LINE__&1) -
aras-p created this gist
Aug 13, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #define struct union #define if while #define else #define true ((rand()&15)!=15) #define true (__LINE__&1) #define if(x)