git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
$html = ""; | |
// URL containing rss feed | |
$url = "http://www.realbeta.net63.net/blog/rss?id=1"; | |
$xml = simplexml_load_file($url); | |
for($i = 0; $i < 1; $i++){ | |
$title = $xml->channel->item[$i]->title; | |
$link = $xml->channel->item[$i]->link; | |
$description = $xml->channel->item[$i]->description; | |
$pubDate = $xml->channel->item[$i]->pubDate; |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"net/mail" | |
"net/smtp" | |
"crypto/tls" | |
) |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
#include <cstdio> | |
#include <string> | |
#include <vector> | |
#include <SDL.h> | |
void logJoystickEvent(SDL_Event e); | |
std::string showHatState(Uint8 hat); | |
int main(int argc, char* argv[]) { | |
// Detect first gamepad on which a key is pressed, then log its events. |
THE ISA AND PC/104 BUS | |
IBM, IBM/XT, IBM PC, and IBM PC AT are registered trademarks of | |
International Business Machines Corporation. | |
This file is designed to give a basic overview of the bus found in | |
most IBM clone computers, often referred to as the XT or AT bus. The | |
AT version of the bus is upwardly compatible, which means that cards |
#include <stdio.h> | |
static int SEED = 0; | |
static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40, | |
185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204, | |
9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81, | |
70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13, | |
203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41, | |
164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105, |
# Directories | |
S_DIR=source | |
B_DIR=build | |
# Files | |
S_FILES=$(S_DIR)/sdl_test.cpp | |
# Output | |
EXEC=$(B_DIR)/sdl_app |
/* | |
* A function for toggling windowed mode in a C++ SDL app. Fullscreen windows will appear on whichever screen the window was on. | |
* | |
* Could be used in conjunction with SDL_GetDisplayName(int displayIndex) | |
* and SDL_GetNumVideoDisplays(void) to programmatically force fullscreen onto a particular display | |
*/ | |
void toggleWindowed() | |
{ | |
//Grab the mouse so that we don't end up with unexpected movement when the dimensions/position of the window changes. |
#================================================ | |
# CMAKE BUILD | |
# WINDOW BUILD CURRENTLY | |
#================================================ | |
cmake_minimum_required(VERSION 3.20) # FetchContent is available in 3.11+ | |
message("CMAKE_BUILD_TYPE >>> " ${CMAKE_BUILD_TYPE}) | |
#convert checks for deubug / release | |
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) | |
if(CMAKE_BUILD_TYPE STREQUAL "debug") |