Skip to content

Instantly share code, notes, and snippets.

@rpedde
rpedde / burn.sh
Created September 1, 2017 20:53
keyboard firmware burner
#!/bin/bash
TOP=$(dirname $(readlink -f $0))
declare -A pids
pids[at90usb1287]=2ffb
pids[at90usb1286]=2ffb
pids[at90usb647]=2ff9
pids[at90usb646]=2ff9
@rpedde
rpedde / findextfs.c
Last active November 20, 2015 17:01
#include <stddef.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdint.h>
#pragma pack(1)
typedef struct t_ext_sb {
uint32_t s_inodes_count;
uint32_t s_blocks_count;
rpedde@hafnium:~$ xrandr
Screen 0: minimum 8 x 8, current 5120 x 1440, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 596mm x 335mm
2560x1440 59.95*+
1920x1080 60.00
1680x1050 59.95
1600x900 60.00
1280x1024 75.02 60.02
1280x800 59.81
@rpedde
rpedde / zexec.py
Created July 15, 2014 20:11
simple zebra exec thing
#!/usr/bin/env python
import requests
import json
import sys
import os
def get_url_and_token():
user = os.getenv('ST_USER', None)
auth = os.getenv('ST_AUTH', None)
[
{
"name" : "watermark",
"exec" : {
"path": "swift://AUTH_f6d34e39-ae2b-4d29-96f6-c35d70d8a4ca/watermark/watermark"
},
"file_list" : [
{"device": "stdin",
"path": "swift://AUTH_f6d34e39-ae2b-4d29-96f6-c35d70d8a4ca/watermark/space.jpg"},
{"device": "stdout",
@rpedde
rpedde / network.md
Last active August 29, 2015 13:56
network thoughts

Requirements

  • Minimize code and deps in ZeroVM proper
  • Make the back-end networking implementation interchangeable
  • Make the back-end services extensible

Proposal

The problem of implementing a networking interface to ZeroVM breaks down into two separate but related problems:

@rpedde
rpedde / rpcdaemon.md
Created December 3, 2013 22:37
docs for rpcdaemon. maybe merge into the rpcdaemon repo?

RPCDAEMON

Overview

Currently, OpenStack Havana does not have built-in support for highly availabile virtual routers or DHCP services. In the existing Havana release, virtual routers and DHCP services are scheduled to a single Quantum network node, and are not rescheduled on network node failure.

Since virtual router and DHCP services are normally scheduled

@rpedde
rpedde / gist:7591961
Last active December 29, 2015 01:19
ubernova
#!/bin/bash
_ubernova() {
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(pushd ${HOME}/.ubernova > /dev/null 2>&1; ls *; popd > /dev/null 2>&1)" -- $cur) )
}
ubernova() {
local env=${1}
@rpedde
rpedde / gist:7571524
Last active December 28, 2015 22:28
uberosc
#!/bin/bash
_uberosc() {
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(pushd ${HOME}/.osc > /dev/null 2>&1; ls *; popd > /dev/null 2>&1)" -- $cur) )
}
uberosc() {
local env=${1}