Skip to content

Instantly share code, notes, and snippets.

@zabirauf
zabirauf / expng.ex
Created July 23, 2015 08:32
PNG format Parser in Elixir
defmodule Expng do
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks]
def png_parse(<<
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A,
_length :: size(32),
"IHDR",
width :: size(32),
height :: size(32),
@bkaradzic
bkaradzic / orthodoxc++.md
Last active May 14, 2025 23:21
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@vasanthk
vasanthk / System Design.md
Last active May 15, 2025 09:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@RedToor
RedToor / btDVR.py
Last active November 8, 2023 19:41
BruteForce IP CAMERA H.264 DVR - Exploit
# Exploit Title: BruteForce IP CAMERA H.264 DVR
# Google Dork: intext:Any time & Any where IP Surveillance for Your Life
# Date: 10/2/15
# Exploit Author: RedToor
# Source: https://gist.github.com/RedToor/71a109a7732884714e8ee07f61cfda59
# Version: ALL
# Tested on: Windows and Linux
# USE:
# python btDVR.py -h 127.0.0.1 -p 3000 -l passwords.txt -u admin
#
@wojteklu
wojteklu / clean_code.md
Last active May 15, 2025 14:30
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

@kkkrackpot
kkkrackpot / 3dl2-specification.txt
Created November 29, 2016 11:31
3dlut file specification
________________________________________________________________________________
3DL2 file format specification
http://forum.doom9.org/showthread.php?p=1525672#post1525672
________________________________________________________________________________
enum {PAGE_SIZE = 16384};
struct H3DLUT2
{
@jfstenuit
jfstenuit / Installing_linux_on_Baytrail_tablet.md
Last active December 12, 2024 10:44
Installing Linux on a Baytrail tablet

Hardware specs

Chinese Brand "ITworks" , Model TW891, distributed in France and Belgium by Darty

  • CPU: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz
  • Video: Intel® HD Graphics for Intel Atom® Processor Z3700 Series
  • Screen: 1280x800
  • WiFi + BT: Realtek RTL8723BS_BT
  • Disks: mmcblk1: mmc1:0001 DF4032 29.1 GiB
  • RAM: 2GB DDR3 @ 1333 MHz
@Abdenasser
Abdenasser / Admob.uno
Created February 20, 2017 13:36
Admob interstitial ads for Fuse
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
using Uno.UX;
[UXGlobalModule]
public class Admob : NativeModule
{
static readonly Admob _instance;
public Android.InterstitialAdPage ad;
@zacharycarter
zacharycarter / wclwn.md
Last active August 19, 2024 03:44
Binding to C Libraries with Nim
@Tetralux
Tetralux / odin.bat
Last active June 11, 2023 15:56
A helper for compiling code with Odin on Windows
@ECHO OFF
:: Path to Odin executable
SET ODINPATH="C:\odin\odin.exe"
:: Path to the Microsoft 'vcvarsall.bat' file.
:: This sets the required environment vars and makes cl.exe and link.exe available in PATH.
SET VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat"
:: Only run the MSVC batch file the first time we