Skip to content

Instantly share code, notes, and snippets.

View nuts-n-bits's full-sized avatar

nuts-n-bits

  • University of Toronto, SGS ECE
  • Toronto, ON, CA
View GitHub Profile
@nuts-n-bits
nuts-n-bits / go.js
Created July 7, 2019 10:55
Random useless historic dump
const Go = (function(){
let Go = function(...fns){
//secure this
let instance = this;
// constructor
let task = new Promise(resolve => resolve());
@nuts-n-bits
nuts-n-bits / Noty.ts
Last active July 7, 2019 10:59
nice handy sticky note
const acceptable_type = function(variable) :boolean {
const type = typeof variable;
return (type === "string" || type === "symbol" || type === "number");
};
export default class Noty {
private _note = {};
note (name : string|symbol|number, content : any = true, ...more_contents) : Noty {
@nuts-n-bits
nuts-n-bits / ytp-skip-ad.js
Last active March 26, 2022 10:14
ytp-skip-ad.js
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
// @grant none
// ==/UserScript==
@nuts-n-bits
nuts-n-bits / channel.rs
Last active June 14, 2021 07:06
Pedagogical std::sync::mpsc::channel
// Pedagogical Impl of std::sync::mpsc::channel
// Crust of Rust: Channels, Gjenset 2020
// https://www.youtube.com/watch?v=b4mS5UPHh20
use std::sync::{Arc, Condvar, Mutex};
use std::collections::VecDeque;
// Channel flavours:
// - Synchronous channels (Bounded channels): send() can block. Bounded capacity.
// - Mutex + Condvar + VecDeque
@nuts-n-bits
nuts-n-bits / Lec 3 notes.md
Last active March 8, 2022 09:56
CMU Comp arch 15' Notes

Lecture 3 ISA

Last time

  • Von Neumann Model (Stored program + Sequential instruction) as opposed to dataflow
  • Algorithm
  • ISA
  • Moore's law
  • What is comp arch