Skip to content

Instantly share code, notes, and snippets.

@maxenglander
maxenglander / ebpf-exporter-config.yaml
Last active March 14, 2022 20:37
ebpf_exporter configuration with a program to measure audit_log_start latency
programs:
- name: audit-log-start-latency
metrics:
histograms:
- name: function_latency_seconds
help: Latency of Linux kernel function
table: dist
bucket_type: fixed
bucket_keys:
- 1000 # 1ms
@maxenglander
maxenglander / 20150512
Created May 12, 2015 04:58
Chromebook /dev/pstore/console-ramoops
...
[ 37.678721] systemd-logind[12681]: New seat seat0.
[ 37.679539] systemd-logind[12681]: New session c1 of user root.
[ 37.689859] systemd-logind[12681]: Failed to create devices:/user/0.user/c1.session: No such file or directory
[ 37.710301] systemd-logind[12681]: New session c2 of user root.
[ 37.727851] systemd-logind[12681]: Failed to create devices:/user/0.user/c2.session: No such file or directory
[ 37.844987] Chromium OS LSM: init_module locking-ignored module="/lib/modules/3.8.11/updates/dkms/vboxdrv.ko" pid=12736 cmdline="modprobe
vboxdrv"
[ 37.850611] vboxdrv: fAsync=0 offMin=0xc8 offMax=0x874
[ 37.850687] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.
@maxenglander
maxenglander / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@maxenglander
maxenglander / Content.php
Created January 23, 2015 17:52
Code Sample
<?php
class Dal_Content extends Dal_Abstract {
const COLLECTION_NAME = 'content';
private $dal_key_content;
/**
* @param Dal_Key_Content $dal_key_content
* @param mixed $db
*/
@maxenglander
maxenglander / master_programming_course.md
Last active January 1, 2016 02:09
Master Programming Course

Topics

  1. Installing Node.js on Mac OS X with Brew
  2. How does the Node.js search path work?
  3. How do I decide whether to install something locally or globaly?
  4. Look at OSC code
  5. Look at Andy Hall's Photoshop code
  6. Bare minimum Photoshop plugin

Installing Node.js on Mac OS X with Brew

@maxenglander
maxenglander / becca_bank.cpp
Created September 22, 2012 19:42
Welcome is inside loop
//-----------------------------------------------------------------
// EGR 126 fall 2012
// Student Name: Rebecca Brenneis
// Assignment: A4
// Submission Date: 9/23/12
// ----------------------------------------------------------------
//
#include <iostream> // required for cin, cout, edl.
#include <cmath> // required for sqrt()
@maxenglander
maxenglander / a2.cpp
Created September 15, 2012 23:14
Becca Brenneis A2
#include <iostream> // required for cin, cout, edl.
#include <cmath> // required for sqrt()
Int main()
{
//Declare objects and
double x1, y1, x2, y2, side1, side2, distance;
side1 = x2 –x1;
@maxenglander
maxenglander / phone.md
Created August 8, 2012 02:35
Node.js metaphor

A traditional request handling model works like this:

  1. Browser makes a connection (think of it as dialing a restaurant)
  2. Server accepts the connection (restaurant employee answers phone)
  3. Browser sends a request (think of this as saying "I'd like to make a dinner reservation")
  4. Server processes the request and sends the response ("Got it, your reservation is made")
  5. The connection is closed (both sides hang up)

This is great, except that each employee is expensive, and the restaurant can only afford to pay N employees. If there are more people calling in a given moment than their are employees to respond to a call, callers will get frustrated that nobody has picked up, hang up, and try again later (or try another restaurant).

@maxenglander
maxenglander / Phone example
Created August 8, 2012 02:35
Node.js metaphor
A traditional request handling model works like this:
1. Browser makes a connection (think of it as dialing a restaurant)
1. Server accepts the connection (restaurant employee answers phone)
1. Browser sends a request (think of this as saying "I'd like to make a dinner reservation")
1. Server processes the request and sends the response ("Got it, your reservation is made")
1. The connection is closed (both sides hang up)
This is great, except that each employee is expensive, and the restaurant can only afford to pay N employees. If there are more people calling in a given moment than their are employees to respond to a call, callers will get frustrated that nobody has picked up, hang up, and try again later (or try another restaurant).