Skip to content

Instantly share code, notes, and snippets.

Basics: Learn Python The Hard Way - Do all exercises, and at least 50% of the extra credit //Done
C, and basic low level programming
(The C Programming Language, by Kernighan and Ritchie)
* Yes, Zed, who you just learned from, hates this book. Ignore him. This is
an exercise in realizing that CS people are very opinionated. And that
these opinions are not always right.
* Learn about makefiles on your own, and use them while doing the exercises
for the book.
* Do all exercises. I recommend pushing through an exercise for at least a
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:0036342e
"ColorTable01"=dword:00a46534
"ColorTable02"=dword:00069a4e
"ColorTable03"=dword:009a9806
"ColorTable04"=dword:000000cc
"ColorTable05"=dword:007b5075
"ColorTable06"=dword:0000a0c4
@hassam7
hassam7 / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:27 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@hassam7
hassam7 / readme.md
Created August 21, 2018 10:40 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

@hassam7
hassam7 / promises_reduce.js
Created November 13, 2020 23:57 — forked from anvk/promises_reduce.js
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
<link rel="shortcut icon" width=32px>
<canvas style="display: none" id="loader" width="16" height="16"></canvas>
<script>
class Loader {
constructor(link, canvas) {
this.link = link;
this.canvas = canvas;
this.context = canvas.getContext('2d');
this.context.lineWidth = 2;
@hassam7
hassam7 / 1.js
Created February 24, 2021 17:19 — forked from getify/1.js
Converting English number sentences ("one hundred forty two point three") to numeric digits ("142.3")
convert("one hundred five"); // "105"
convert("six hundred and fifty three"); // "653"
convert("zero zero one two three"); // "123"
convert("twelve o three"); // "1203"
convert("thirteen zero nine"); // "1309"
convert("fifteen sixteen"); // "1516"
convert("fourteen ninety two"); // "1492"
convert("nineteen ten"); // "1910"
convert("twenty twenty"); // "2020" <---- ugh!
convert("twenty twenty one"); // "2021" <---- ehhh...
@hassam7
hassam7 / leetcode-bloomberg.md
Created March 3, 2021 10:37 — forked from jayant91089/leetcode-bloomberg.md
Answers to leetcode questions tagged 'Bloomberg'

121 Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.

If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.

Example 1: Input: [7, 1, 5, 3, 6, 4] Output: 5

@hassam7
hassam7 / it-ebooks.md
Created April 19, 2021 23:28 — forked from baiwfg2/it-ebooks.md
Download ebooks as you want
@hassam7
hassam7 / GreenBox.tsx
Created October 2, 2021 13:09 — forked from mfal/GreenBox.tsx
Extend regular HTML Elements with React & TypeScript
// We extend from React.HTMLAttributes to get all the HTML attributes
// Don't extend React.HTMLProps!
export interface IGreenBoxProps extends React.HTMLAttributes<HTMLDivElement> {
title: string;
}
class GreenBox extends React.Component<IGreenBoxProps, void> {
public render() {
// If you don't spread children and title, the restProps
// still contain these props and compiler will say "no"