Skip to content

Instantly share code, notes, and snippets.

@mauro-balades
Last active June 21, 2024 19:44
Show Gist options
  • Save mauro-balades/93a5c0abb251d30549f41036601a6c5a to your computer and use it in GitHub Desktop.
Save mauro-balades/93a5c0abb251d30549f41036601a6c5a to your computer and use it in GitHub Desktop.
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This is an "extension" for https://gist.github.com/aras-p/6224951
#define ; ; // not a semi colon >:)
#define union struct
#define true (2 & 3 == 2)
#define volatile __declspec(thread)
// looooops
#define continue break
// Math
#define long int
// Exit status
#ifdef EXIT_SUCCESS
#undef EXIT_SUCCESS
#endif
typedef void (*EXIT_SUCCESS)();
#ifdef EXIT_FAILURE
#undef EXIT_FAILURE
#endif
typedef void (*EXIT_FAILURE)();
// Debug
#ifdef DEBUG
#undef DEBUG
#endif
#ifdef NDEBUG
#undef NDEBUG
#endif
// this is C, not c++
#undef __cplusplus
// u already had imported the stdlib, wdym?
#define __STDLIB_H__ 1
// no exceptions, no problems
void __cxa_allocate_exception() { /*do nothing*/ }
void __cxa_throw() { /*do nothing*/ }
// invert stdio
using namespace std;
#define cout cin
#define cin cout
// Cange data types
#define char bool
#define int int8_t
#define long int16_t
#define unsigned signed
#define malloc(s) free(s)
#define delete default
#define override final
// Assert
#define assert(x) throw x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment