Skip to content

Instantly share code, notes, and snippets.

View bcomnes's full-sized avatar
👽

Bret Comnes bcomnes

👽
View GitHub Profile
@bcomnes
bcomnes / index.js
Created March 5, 2014 23:50
node sudo hardware code
devices = {
devArduino: {
port: '/dev/tty.usbserial-A800ewsy'
function: 'stage'
},
stageArduino: {
port: '/dev/tty.usbmodem3d11',
function: 'stage'
},
scopeSerial: {

Keybase proof

I hereby claim:

  • I am bcomnes on github.
  • I am bret (https://keybase.io/bret) on keybase.
  • I have a public key whose fingerprint is CF24 7B7A ABD0 67AE 3DCC 320A 0BCF 329D 5622 03D9

To claim this, I am signing this object:

var serialport = require('serialport');
var SerialPort = serialport.SerialPort;
var replify = require('replify');
var serialPort = new SerialPort('/dev/cu.PL2303-0000101D', {
baudrate: 2400,
parser: serialport.parsers.readline('\r')
});
serialPort.on('open', function () {
> serialPort.list(function (err, ports) { console.log(ports) });
undefined
> [ { comName: 'COM5',
manufacturer: 'Gigaware',
serialNumber: '',
pnpId: 'USB\\VID_05AD&PID_0FBA\\5&C663B7B&0&1',
locationId: '',
vendorId: '',
productId: '' } ]
@bcomnes
bcomnes / pdx.devweek.org
Last active August 29, 2015 14:03
CFP PDX dev week
@bcomnes
bcomnes / index.html
Created July 14, 2014 02:39
Select styles with CSS only - JS Bin http://jsbin.com/juvixufu/168/edit
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@bcomnes
bcomnes / example.sh
Created July 22, 2014 17:44
Trying to write tests for xylib
arc-mac-04:samples bcomnes$ echo "20.0 490.5" > test.txt
arc-mac-04:samples bcomnes$ cat test.txt
20.0 490.5
arc-mac-04:samples bcomnes$ xyconv -g test.txt
text: ascii text
@bcomnes
bcomnes / hw3.lhs
Created August 14, 2014 21:06
Just just haskell Ted gave to me
------------------------------------------------------------------------
CS457/557 Functional Languages, Winter 2014 Homework 3
------------------------------------------------------------------------
> import Control.Applicative((<$>),(<*>))
> import Data.List(intersperse, transpose)
> import Test.QuickCheck(quickCheck)
> import Test.QuickCheck.Arbitrary(Arbitrary, arbitrary)
> import Test.QuickCheck.Gen(choose, vectorOf)
@bcomnes
bcomnes / package.json
Created September 4, 2014 21:16
a nice package.json example
{
"name": "flash",
"description": "",
"version": "0.0.0",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com",
"twitter": "https://twitter.com/jongleberry"
},
@bcomnes
bcomnes / baseline.sh
Last active August 29, 2015 14:06 — forked from bear/baseline.sh
#!/bin/bash
# assumes a fairly recent Ubuntu - may work on Debian or others but needs testing
# assumes you have your .ssh/config setup to specify a user and key for the host
HOST=$1
ssh root@${HOST} "sed -i .backup -e 's/PermitRootLogin\syes/PermitRootLogin no/' /etc/ssh/sshd_config"
ssh root@${HOST} "sed -i .backup -e 's/#PasswordAuthentication\syes/PasswordAuthentication no/' /etc/ssh/sshd_config"
ssh root@${HOST} "sed -i .backup -e 's/X11Forwarding\syes/X11Forwarding no/' /etc/ssh/sshd_config"