Skip to content

Instantly share code, notes, and snippets.

View lazd's full-sized avatar

Larry Davis lazd

View GitHub Profile
@lazd
lazd / templates.js
Created March 3, 2015 21:22
DOMly Issue #22: issue/22
this["templates"] = {};
this["templates"]["Advanced"] = (function anonymous(data_0) {
var data = data_0;
var el0 = document.createElement("div");
el0.className = "person";
var el2 = document.createElement("h1");
el2.className = "name";
el2.textContent = data_0["name"];
el0.appendChild(el2);
var el4 = document.createElement("h2");
@lazd
lazd / templates.js
Created March 3, 2015 21:23
DOMly Issue #22: issue/22-no-vars
this["templates"] = {};
this["templates"]["Advanced"] = (function anonymous(data_in) {
var data;
var stack = [data_in];
var el0 = document.createElement("div");
el0.className = "person";
var el2 = document.createElement("h1");
el2.className = "name";
el2.textContent = stack[0]["name"];
el0.appendChild(el2);
@lazd
lazd / rmold.sh
Last active August 29, 2015 14:17
A quick little script to delete files from of lists of folders older than a certain number of days
#!/usr/bin/env bash
# Delete files older than the given number of days in the given directory
# Usage: rmold $DAYS $DIR
# Example: rmold 7 temp
function rmold() {
DAYS=$1
DIR=$2
# Execute operation
# Be a QUADX
mixer QUADX
# Enable servo mixer
feature SERVO_MIXER
# Reset servo mixer
smix reset
# Control servo output 1 with channel 7 (AUX_3)

Servo mixer enabled

These types support enabling the servo mixer on ESC/servo pins 1 and 2.

  • MULTITYPE_QUADP
  • MULTITYPE_QUADX
  • MULTITYPE_Y4
  • MULTITYPE_CUSTOM_PLANE
  • MULTITYPE_GIMBAL
  • MULTITYPE_VTAIL4
#!/usr/bin/env bash
# Delete files older than the given number of days in the given directory
# Usage: rmold $DAYS $DIR
# Example: rmold 7 temp
function rmold() {
DAYS=$1
DIR=$2
# Find only files older than the specified date/time
echo "Deleting files in $DIR older than $DAYS days old"
@lazd
lazd / gist:f7d459795f80846ab593
Created July 14, 2015 01:44
Beef's brushed board dump
Afro32 CLI version 2.3 May 30 2015 / 02:28:47Current Config: Copy everything below here...
aux 0 0
aux 1 0
aux 2 0
aux 3 0
aux 4 0
aux 5 0
aux 6 0
aux 7 0
aux 8 0
(function() {
var req = new XMLHttpRequest();
req.addEventListener('load', function() {
var container = document.createElement('pre');
container.textContent = this.responseText;
document.body.appendChild(container)
});
req.open("get", './Summary.txt', true);
req.send();
}());
function delegate(el, type, selector, callback) {
el = typeof el === 'string' ? document.querySelector(el) : el;
if (!el) return;
el.addEventListener(type, function(event) {
var node = event.target;
while (node && node !== el) {
if (node.matches(selector))
callback.call(node, event);
node = node.parentNode;
}
@lazd
lazd / Falcon 185 Baseline Setup - Luxfloat.txt
Last active May 27, 2016 20:59
Falcon 185 Baseline Setup - Luxfloat
# features
feature -MOTOR_STOP
feature VBAT
feature RX_SERIAL
feature SOFTSERIAL
feature FAILSAFE
feature TELEMETRY
feature ONESHOT125
feature BLACKBOX