Skip to content

Instantly share code, notes, and snippets.

Chris Weiss chrwei

Block or report user

Report or block chrwei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chrwei
chrwei / ds18.ino
Created May 4, 2017
esp8266 + 2 x ds12b20
View ds18.ino
#include <OneWire.h>
#include <DallasTemperature.h>
//pin definitions
const int pin1wire = D3;
//ds18b20 stuff
const int ds18Resolution = 12;
const int ds18count = 2;
DeviceAddress ds18addr[] = {
View neo_larson.ino
// action shot https://i.imgur.com/kpAiXTV.gifv
#include <Adafruit_NeoPixel.h>
#define N_LEDS 60
#define PIN 8
Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
View serial_relay.ino
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
if(Serial.available()) {
Serial1.write(Serial.read());
}
if(Serial1.available()) {
View serial_test.js
var SerialPort = require("serialport").SerialPort
var serialPort = new SerialPort("/home/root/tty1", {
baudrate: 115200
});
var count = 0;
serialPort.on("open", function () {
console.log('open');
serialPort.on('data', function(data) {
View serial_edison.ino
/*
* Serial echo for verifying communication with a PC based program
* On Galileo or Edison this can talk to a process on the host
* if you setup socat to create some devices.
*/
//Galileo or Edison, setup ring buffer and TTYUARTClass
RingBuffer rx_buffer_S1;
TTYUARTClass mySerial(&rx_buffer_S1, 3, false);
View serial_test.ino
/*
* Serial echo for verifying communication with a PC based program
* On Galileo or Edison this can talk to a process on the host
* if you setup socat to create some devices.
*/
#if defined(__ARDUINO_X86__)
//Galileo or Edison, setup ring buffer and TTYUARTClass
RingBuffer rx_buffer_S1;
TTYUARTClass mySerial(&rx_buffer_S1, 3, false);
@chrwei
chrwei / gist:42f8bbb687290b04b598
Last active Jul 9, 2017
How To install SCST on Ubutuntu 15.04 with in-tree kernel patches
View gist:42f8bbb687290b04b598

These instructions are for SCST trunk as of 5/25/2015 and Ubuntu server 15.04 with 3.19.0-18-generic amd64 kernel. adjust paths as needed

SCST official site

commands all relative to the build dir of your choice and mostly dependent on the command above it

get latest SCST:

 svn co https://scst.svn.sourceforge.net/svnroot/scst/trunk scst

make kernel patch:

View fix-align.ps1
if ((Get-PSSnapin "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) -eq $null) {
Add-PSSnapin "VMware.VimAutomation.Core"
}
Connect-VIServer 'vcenter'
$vmlist = @()
$vmlist += "vncproxy"
$vmlist += "vma"
View livesubtitles.sh
#!/bin/bash
# our variables
BMOVL="/tmp/bmovl"
CTL="/tmp/ctl"
MYNICK="arsubs"
MYCHAN="#archreactor"
SUBFILE="/tmp/sub.tga"
# setup our sockets
You can’t perform that action at this time.