Skip to content

Instantly share code, notes, and snippets.


Hashim Aziz Kaos-Industries

View GitHub Profile
Kaos-Industries / iszero-fast.cpp
Created Sep 21, 2020 — forked from BobVul/iszero-fast.cpp
Check for nonzero data in a stream, quickly and without output. Answers
View iszero-fast.cpp
#include <cstdio>
#define BUFFER_SIZE 1024
int main() {
FILE* file = stdin;
char buffer[BUFFER_SIZE];
long long bytes_read = 0;
while (bytes_read = fread(buffer, 1, BUFFER_SIZE, file)) {
Kaos-Industries / .gitignore
Created Sep 13, 2019
This modified version of Bill Erickson's .gitignore file for Wordpress differs in that I chose to include all plugins so I can quickly use Git to see whether any have been infected by malware. I also added the .vscode folder to the ignore list, and changed "ehthumbs.db" to "thumbs.db", which was likely the original intention.
View .gitignore
# Ignore everything except plugins... #