Skip to content

Instantly share code, notes, and snippets.

View ptruser's full-sized avatar
🍉
Melon

ptruser ptruser

🍉
Melon
View GitHub Profile
@ptruser
ptruser / GPUOptimizationForGameDev.md
Created August 19, 2020 00:27 — forked from silvesthu/GPUOptimizationForGameDev.md
GPU Optimization for GameDev
@ptruser
ptruser / incver
Last active August 14, 2020 06:42
#!/bin/sh -eux
sed -i Makefile -e "s/^VERSION=${1}/VERSION=${2}/"
git add Makefile
git commit -m "Update version to ${2}"
@ptruser
ptruser / 1+3.sql
Created June 8, 2020 20:11
543543bvdxzgzfgdf
-- 1.0
CREATE TABLE illiquidity_goods_original
(
product_code INT,
name_code INT,
brand NTEXT,
price MONEY,
producer_countries VARCHAR(20),
date_of_manufacture DATE,
@ptruser
ptruser / WhatIsStrictAliasingAndWhyDoWeCare.md
Created April 23, 2020 05:04 — forked from shafik/WhatIsStrictAliasingAndWhyDoWeCare.md
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@ptruser
ptruser / gist:5ed14c333c1b3bee2299ae98c6cfc893
Created March 1, 2020 06:21 — forked from vrinek/gist:bda51f6fc8b22b5df301
Blizzard Software Engineering Reading

Blizzard Software Engineering Reading

by Jay Baxter (circa 2009)

Associate developer

"This list is for people who want to become Associate Software Engineers at Blizzard. An associate should have skills at the level indicated by these books. Note that this is almost completely focused on C++ programming. This list is incomplete. I need a book on how to become a professional. I've listed several books that give examples of professional behavior, but not one on the actual training."

Programming: Principles and Practice Using C++

by Bjarne Stroustrup

@ptruser
ptruser / netgear-private-key-disclosure.md
Created January 21, 2020 08:22 — forked from nstarke/netgear-private-key-disclosure.md
Netgear TLS Private Key Disclosure through Device Firmware Images

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.