For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
void hexdump(const void* data, size_t size) { | |
size_t j; | |
size_t i; | |
#define nexti (i + 1) | |
const uint8_t wrap = 16; | |
char ascii[wrap + 1]; | |
memset(ascii, 0, sizeof(ascii)); | |
for (i = 0; i < size; ++i) { |
template<typename T> | |
T exponentialAverageFilter(const T& value, T& pastValue, const float& filterWeight = 0.8) { | |
return static_cast<T>((1.0 - filterWeight) * pastValue + (filterWeight * value)); | |
} |
With the OS X firewall enabled, you can remove the "Do you want the application "python" to accept incoming network connections?" message. | |
Create a self-signed certificate. | |
Open Keychain Access. Applications > Utilities > Keychain Access. | |
Keychain Access menu > Certificate Assistant > Create a Certificate... | |
Enter a Name like "My Certificate". | |
Select Identity Type: Self Signed Root | |
Select Certificate Type: Code Signing | |
Check the Let me override defaults box |
/* | |
* Copyright (c) 2009-2017, Farooq Mela | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
No prototypes. Just make the game. polish as you go. Don't depend on polish happening later. Always maintain constantly shippable code.
It is incredibly important that your game can always be run by your team. Bulletproof your engine by providing defaults upon load failure.
Keep your code absolutely simple. Keep looking at your functions and figure out how you can simplify further.
Great tools help make great games. Spend as much time on tools as possible.
typedef struct __attribute__((packed)) { | |
double kP; | |
double kI; | |
double kD; | |
uint8_t checksum; | |
} PID_t; | |
PID_t pidParam = { 16.0, 0.10, 1.0, 0 }; | |
#include <stdio.h> | |
typedef struct bits_packed { | |
unsigned int b0:1; | |
unsigned int b1:1; | |
unsigned int b2:1; | |
unsigned int b3:1; | |
unsigned int b4:1; | |
unsigned int b5:1; | |
unsigned int b6:1; |