Skip to content

Instantly share code, notes, and snippets.

View nrobinson2000's full-sized avatar

Nate Robinson nrobinson2000

View GitHub Profile
@nrobinson2000
nrobinson2000 / cehs-install.sh
Last active December 6, 2018 20:47
Script to install po on CEHS computers
#!/bin/bash -li
echo "
Are you ready to install po-util?
Please be sure to follow any prompts or instructions
during the installation process."
read -rp "ENTER / CTRL-C: "
echo "
@nrobinson2000
nrobinson2000 / nrobinson2000-particle.js
Last active May 16, 2020 11:49
Call particle functions and get particle variables from a device in javascript
var token = "YOUR_PARTICLE_ACCESS_TOKEN";
var device = "YOUR_PARTICLE_DEVICEID";
function httpPost(url, params)
{
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
//Send the proper header information along with the request
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
@nrobinson2000
nrobinson2000 / update.md
Last active September 29, 2017 07:56
Particle Offline Utility: A handy script for installing and using the Particle Toolchain on Ubuntu-based Distros and OSX
@sentinelt
sentinelt / gist:3f1a984533556cf890d9
Created February 6, 2015 18:44
Program to set arbitrary speed
/*
* Allows to set arbitrary speed for the serial device on Linux.
* stty allows to set only predefined values: 9600, 19200, 38400, 57600, 115200, 230400, 460800.
*/
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <asm/termios.h>
int main(int argc, char* argv[]) {
@preshing
preshing / build_cross_gcc
Last active April 11, 2024 02:14
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.