Skip to content

Instantly share code, notes, and snippets.

View awave1's full-sized avatar

Artem Golovin awave1

  • Vancouver, Canada
  • 06:13 (UTC -07:00)
View GitHub Profile

Interrupts

Programmed (polling IO) requires busy-wait loop:

  • CPU can't proceed with other computations
  • CPU can't service other devices

Cpu must juggle many tasks concurrently.

Interrupt Basics

void
cocoa_set_titlebar_color(void *w)
{
if (!change_titlebar_color) return;
NSWindow *window = (NSWindow *)w;
double red = ((titlebar_color >> 16) & 0xFF) / 255.0;
double green = ((titlebar_color >> 8) & 0xFF) / 255.0;
double blue = (titlebar_color & 0xFF) / 255.0;
apr
apr-util
autoconf
automake
bash-completion
binutils
bison
boost
cairo
chunkwm
<template>
<div id='designReport'>
<div class='page'>
<div class='pageHeader'>
<div>
<h2>CHI: Design Report</h2>
</div>
</div>
<div class='pageContent'>
<template>
<div class="designSelection">
<h5 class='name'>{{ step.name }}</h5>
<div
v-for="section of step.sections"
v-if="section"
class='selectionBody'>
<div
v-for="category of section.categories"
v-if="category.selected">
version: 2
jobs:
build:
docker:
- image: circleci/node:9
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
@awave1
awave1 / max.c
Created September 16, 2018 04:34
#include <stdio.h>
#include <math.h>
#define MAX_X 5
#define MIN_X -6
int f(int x) {
return (-5*pow(x, 3)) - (31 * pow(x, 2)) + (4 * x) + 31;
}
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
outer:
// test, if test failed, outer is done => b done
// otherwise do inner
inner:
// test, if test failed, inner is done => b outer_done
// increment inner counter
// do stuff
b inner
@awave1
awave1 / a03.tex
Last active October 29, 2018 06:23
\documentclass[11pt]{article}
\usepackage[shortlabels]{enumerate}
\usepackage{fullpage, verbatim, amsthm, amsmath, amssymb, amsfonts}
% Macros
\def\code#1{\texttt{#1}}
\def\c#1{\texttt{#1}}