Skip to content

Instantly share code, notes, and snippets.

@colelawrence
colelawrence / sample-spec.ts
Last active July 28, 2016 15:57
Angular 2 TestComponentBuilder example
import {
it,
inject,
describe,
beforeEachProviders,
TestComponentBuilder
} from '@angular/core/testing';
import { PMBDDAmountComponent } from './pmb-dd-amount.component';
// Helper function gets element of type T from parent dom element
function getElement<T>(parent: HTMLElement, selector: string): Promise<T> {
return new Promise<T>((resolve, reject) => {
setTimeout(
() => {
try {
resolve(<T><any> parent.querySelector(selector));
} catch (error) {
reject(error);
CapsLock::LControl
#IfWinActive ahk_exe chrome.exe
<^Tab::>!Tab
LAlt::LControl
@colelawrence
colelawrence / add-links-and-table-of-contents.css
Last active August 8, 2016 17:03
Add links to Google Docs html output
@colelawrence
colelawrence / .bashrc
Created August 12, 2016 20:18
Dot files from my VML Mac (all configured by moi)
export JAVA_HOME=$(/usr/libexec/java_home)
@colelawrence
colelawrence / .nvidia-settings-rc
Last active August 25, 2016 19:24
Setting up Linux Mint
#
# /home/colelawrence/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility
# Generated on Sun Aug 7 13:17:23 2016
#
# ConfigProperties:
RcFileLocale = C
@colelawrence
colelawrence / ch3-line-info.exs
Last active September 28, 2016 17:39
Practice - Chapter 3 - Elixir in Action
defmodule LineInfo do
@spec lines_lengths!(String.t) :: Stream.t
def lines_lengths! filepath do
File.stream!(filepath)
|> Stream.map(&String.replace(&1, "\n", ""))
|> Stream.map(&{&1, String.length(&1)})
|> Stream.with_index
end
defp get_val {{_, val}, _} do
// kebab => capitallization
// open-up => OpenUp
// -a => A
function kebabToCaps(str) {
return String(str).replace(/(?:\-|^)(\w)?/g, (match, letter) => {
return letter ? letter.toUpperCase() : ''
})
}

What makes up the CPU?

Anticipate looking up videos about console emulation to find these terms in that context.

  • ALU

  • CU

  • CPU

    • Internal memory (cache)