Skip to content

Instantly share code, notes, and snippets.

@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:

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

@AmaanC
AmaanC / irccloud-colorize.js
Created November 18, 2015 17:20 — forked from blha303/irccloud-colorize.js
IRCCloud replace & with formatting characters | &b is bold, &r is reset, &<number from 0 to 15> is a color | I'm going to regret this.
var inputbox = $('#bufferInputView' + cb().bid());
var msg = inputbox.val();
inputbox.val("");
var cc = "\u0003";
var bold = "\u0002";
var reset = "\u000f";
var italic = "\u0016";
var underline = "\u001f";
cb().say(msg.replace(/&b/g,bold).replace(/&r/g,reset).replace(/&i/g,italic).replace(/&u/g,underline).replace(/&/g,cc));
Sid Meier's 10 Rules of Game Design
1. Choose a topic you have a passion for. Game Design is about creativity.
2. Do research after the game is done. Tap into the player’s brain.
3. Define your axioms, refine your axioms. Prototype, prototype, prototype; sit in all the chairs.
4. Double it or cut it in half. You are more wrong than you think.
function createWebSocket () {
var connection = new WebSocket();
var attempts = 1;
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...
}
@AmaanC
AmaanC / gist:4064316
Created November 13, 2012 06:32 — forked from ralt/gist:4061749
My Library when IE8 won't be supported anymore
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.map = HTMLCollection.prototype.map = Array.prototype.map;
NodeList.prototype.filter = HTMLCollection.prototype.filter = Array.prototype.filter;
NodeList.prototype.reduce = HTMLCollection.prototype.reduce = Array.prototype.reduce;
NodeList.prototype.every = HTMLCollection.prototype.every = Array.prototype.every;
NodeList.prototype.some = HTMLCollection.prototype.some = Array.prototype.some;
var By = {
id: function (id) { return document.getElementById(id) },
tag: function (tag, context) {
return (context || document).getElementsByTagName(tag)
@AmaanC
AmaanC / corporate-eula.md
Created November 6, 2012 16:52 — forked from rlemon/corporate-eula.md
EULA corporate

End User License Agreement.

  1. You have no rights
  2. Please read carefully 1

Last updated November 1st, 2012.

@AmaanC
AmaanC / gist:4007749
Created November 3, 2012 16:05
Interesting stuff for dievardump
1. Zirak likes babies.