Skip to content

Instantly share code, notes, and snippets.

View daniellandau's full-sized avatar

Daniel Landau daniellandau

View GitHub Profile
@daniellandau
daniellandau / OutRunCalculator.scala
Created March 15, 2014 20:40
Reaktor Fast Track
import scala.util.parsing.combinator._
import scala.io.Source
class OutRunParser extends JavaTokenParsers {
override val skipWhitespace = false
def int: Parser[Int] = wholeNumber ^^ (_.toInt)
def ints: Parser[List[Int]] = repsep(int, """[ \t]+""".r)
def tree: Parser[List[List[Int]]] = repsep(ints, """\n""".r)
}

Keybase proof

I hereby claim:

  • I am daniellandau on github.
  • I am dlandau (https://keybase.io/dlandau) on keybase.
  • I have a public key whose fingerprint is 0696 B836 BC43 DC01 30C8 48BC 3EB0 51FF BC93 BE29

To claim this, I am signing this object:

@daniellandau
daniellandau / keys.js
Created July 28, 2016 19:16
Gnome Shell extension code for grabbing key events from X
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
let initialized = false;
let keymap = {}, xinputPids = [], xinputs = [];
function trackKeys(callback, out_reader, res) {
if (!initialized) initialize();
// related: https://twitter.com/andrestaltz/status/939257877600104448
import React from 'react';
import ReactDOM from 'react-dom';
class Foobar extends React.Component {
componentDidMount() {
console.log('Did mount');
}
shouldComponentUpdate(newProps) {
This file has been truncated, but you can view the full file.
/*
* Copyright (c) 2015, Freescale Semiconductor, Inc.
* Copyright 2016 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
const fs = require("fs")
const buf = fs.readFileSync("/dev/stdin")
if (buf.length !== 20) {
console.log(`${+new Date()};error;error;error`)
process.exit()
}
const offset = 8
const dataByteSize = 12
-- Logs begin at Thu 2020-09-10 11:02:14 UTC, end at Thu 2020-09-10 13:26:32 UTC. --
Sep 10 13:19:56 wren kernel: Booting Linux on physical CPU 0x0
Sep 10 13:19:56 wren kernel: Initializing cgroup subsys cpuset
Sep 10 13:19:56 wren kernel: Initializing cgroup subsys cpu
Sep 10 13:19:56 wren kernel: Initializing cgroup subsys cpuacct
Sep 10 13:19:56 wren kernel: Linux version 3.10.40 (oe-user@oe-host) (gcc version 8.3.0 (GCC) ) #1 SMP PREEMPT Thu Aug 20 10:15:32 UTC 2020
Sep 10 13:19:56 wren kernel: CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
Sep 10 13:19:56 wren kernel: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Sep 10 13:19:56 wren kernel: Machine: Qualcomm Technologies, Inc. MSM 8226 (Flattened Device Tree), model: wren pr3 -Qualcomm APQ 8026v2W MTP
Sep 10 13:19:56 wren kernel: Node qcom,asusdebug removed memory 11f00000-12100005