Skip to content

Instantly share code, notes, and snippets.

View BrianAdams's full-sized avatar

badevguru BrianAdams

  • Bay Area, CA
View GitHub Profile
@BrianAdams
BrianAdams / gist:8fef9e168310250795bc0ba6d596b9a0
Created September 23, 2021 02:41
livebook branced section bug
# Bug Repo Case
## Tools
### How to use this notebook
This notebook will crash when the index of the first branch is set to a 0 index
```
<!-- livebook:{"branch_parent_index":0} -->
@BrianAdams
BrianAdams / gist:b289f782ed3bb186aadbd90b02c23db2
Created July 24, 2017 19:08
Modifed preload script that allows passing in the container size instead of trying to calculate it (work around for compressed images issue)
#!/bin/bash
set -e
set -o pipefail
IMAGE=${IMAGE:-"/img/resin.img"}
API_HOST=${API_HOST:-"https://api.resin.io"}
REGISTRY_HOST=${REGISTRY_HOST:-"registry2.resin.io"}
SPLASH_IMAGE=${SPLASH_IMAGE:-"/img/resin-logo.png"}
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../orov-behaviors/orov-behavior.html">
<link rel="import" href="orov-horizon-behavior.html">
<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
<dom-module id="orov-horizon-test">
<style type="text/css">
.hidden { display: none }
.horizon {
width:100%;
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../orov-behaviors/orov-behavior.html">
<script>
(function (window) {
'use strict';
//ensure the namespace exists in the window object
if(!(window.OROV)){window.OROV={}}
if(!(window.OROV.behaviors)){window.OROV.behaviors={}}
var behaviors = window.OROV.behaviors;
@BrianAdams
BrianAdams / headers-debian-byteshift.patch
Last active September 23, 2016 17:14
ARM patch for kernel module builds referencing cross compiled kernel headers (https://github.com/igorpecovnik/lib/blob/next/patch/headers-debian-byteshift.patch)
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-2-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/include/tools/be_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
tools/include/tools/le_byteshift.h | 70 +++++++++++++++++++++++++++++++++++++
2 files changed, 140 insertions(+)
@BrianAdams
BrianAdams / index.html
Created August 4, 2016 19:15
openscience-auth-question
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OpenScience</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular-route.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
@BrianAdams
BrianAdams / index.js
Created April 6, 2016 01:19
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var SimplePeer = require('simple-peer')
var peer1 = new SimplePeer({ initiator: true })
var peer2 = new SimplePeer()
peer1.on('signal', function (data) {
@BrianAdams
BrianAdams / gist:6a0b53a179375198ce68
Last active June 16, 2016 00:44
Add Java to Scaleway Instance
# install add-apt-repository
sudo apt-get update
sudo apt-get install -y software-properties-common
# install oracle jdk8
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-java8-installer
@BrianAdams
BrianAdams / gist:bf527d69a6e95b66db65
Created September 28, 2015 17:25
ffmpeg options for mp4 live stream profile
-framerate 30 \
-an \
-f mp4 \
-g 3 \
-keyint_min 3 \
-reset_timestamps 1 \
-movflags empty_moov+default_base_moof+frag_keyframe \
-profile:v main \
-level 30 \
-pix_fmt yuv420p \
@BrianAdams
BrianAdams / Dockerfile
Last active May 2, 2016 15:39
This docker file will setup ros with rosbridge and the openrov plugin
FROM quantumobject/docker-ros-base
MAINTAINER Brian Adams "brian@openrov.com"
RUN apt-get update && apt-get install -y \
ros-jade-rosbridge-suite \
gstreamer0.10 \
libgstreamer-plugins-base0.10-dev \
ros-jade-image-transport \
ros-jade-camera-calibration-parsers \
ros-jade-camera-info-manager \