Skip to content

Instantly share code, notes, and snippets.

View dmoa's full-sized avatar

Stan Osipenko dmoa

View GitHub Profile
@d7samurai
d7samurai / .readme.md
Last active May 20, 2024 15:08
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup and rendering techniques.

@igormuba
igormuba / whatsapp_sendMSG.js
Last active November 9, 2022 02:32 — forked from yask123/whatsapp_sendMSG.js
Spam messages to WhatsApp counting from 0
// Are you new to Javascript?
//Just copy, open firefox (did not work on Google Chrome for me)
//press f12, go console tab, paste, change according to instructions and press enter
//Thank you rafaelxavierborges for providing the message sending code
//I have just turned it into a spammer that counts from 0 and send the next number every second
var t=0; //what is the first number you want to send
var i=1; //delay in seconds
setInterval(function(){
window.InputEvent = window.Event || window.InputEvent;
var d = new Date();

A primer on x86 assembly with GNU assembler

When it comes to assembly language, it isn't as hard as many people think. Fundamentally, you write short, human-readable commands for the processor to execute (your assembly code) and then use a tool (the actual assembler) to translate your code into machine-readable binary instructions. Unlike high-level languages, assembly language is very simple and doesn't have that many features. The difficulty is to deal with memory and build more complex flows (e.g. loops or I/O) from the simple primitives that the assembly language gives you.

Registers and instructions

CPUs usually have small, very fast storage available for the data that is used in its instructions. This kind of storage is much smaller but also much faster than the RAM and is called registers. An x86 processor has a bunch of them to store generic data, manage the stack, keep track of the current instruction and other administrative inform

@itod
itod / split_keyboards.md
Last active May 24, 2024 23:05
Every "split" mechanical keyboard currently being sold that I know of
@wojteklu
wojteklu / clean_code.md
Last active May 28, 2024 15:45
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@paniq
paniq / ecs.md
Last active May 27, 2023 10:34
Entity Component Systems
@yask123
yask123 / whatsapp_sendMSG.js
Created January 24, 2015 17:08
Send messages on whatsapp by Javascript
document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; // Fills the text box message
var input = document.getElementsByClassName("icon btn-icon icon-send");//Grabs the send button
input[0].click();// Clicks the send button