Skip to content

Instantly share code, notes, and snippets.

@AmaanC
AmaanC / bananapi-panel-ilitek-ili9881c.c
Last active February 6, 2020 16:04
A comparison between the Linux 5.5 ILI9881C panel driver vs. the one for BananaPi in buildroot
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2017, Free Electrons
* Author: Maxime Ripard <maxime.ripard@free-electrons.com>
*/
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
@AmaanC
AmaanC / writeup.md
Created August 29, 2019 08:34 — forked from edmundsmith/writeup.md
Method for Emulating Higher-Kinded Types in Rust

Method for Emulating Higher-Kinded Types in Rust

Intro

I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.

There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.

As an example, currently we can express this type:

-- My solution to:
-- https://plfa.github.io/Naturals/#Bin
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎)
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ

Entertainment:

  • Radiolab (the further back you go, the more science-y they get)
  • This American Life
  • Serial
  • Invisibilia
  • youarenotsosmart

Tech ones you may or may not be into:

@AmaanC
AmaanC / Makefile
Last active November 15, 2017 07:32
Adding support for WebAssembly's call_indirect operator directly in your C code by compiling LLVM IR with your C code through emscripten
main.wasm: main.c call-indirect.ll
emcc $^ -o $@ \
-O3 \
-s LEGALIZE_JS_FFI=0 \
-s WASM=1 -s SIDE_MODULE=1 \
-g4
.PHONY: serve
serve: main.wasm loader.js index.html
python3 -m http.server 8888

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Document it

Recon

Unicornscans in cli, nmap in msfconsole to help store loot in database.

@AmaanC
AmaanC / textbooks.md
Created December 12, 2016 12:49 — forked from erikroyall/textbooks.md
Alex Stef's list of freely-available mathematics textbooks

Textbooks in Mathematics

A list of links to useful mathematical textbooks available for free on the Internet. They are all legal and maintained by their authors or by the legitimate publisher.

All the documents are in English. They are in a printable format - Postscript or Adobe Portable Document Format. You are free to download, read and print them. Here are some links to other sites offering lists of free mathematical textbooks.

For any comments, please, contact me: alex_stef@yahoo.com