Skip to content

Instantly share code, notes, and snippets.

View DeviNoles's full-sized avatar
📈
Grinding

DEVIN DeviNoles

📈
Grinding
View GitHub Profile
import subprocess
import time
def run_command(command, timeout_duration):
try:
# Execute the command with a timeout
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate(timeout=timeout_duration)
# Print output and errors
#include <string.h>
#include <stdio.h>
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 0 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 15 // Popular NeoPixel ring size
// Paint example specifically for the TFTLCD breakout board.
// If using the Arduino shield, use the tftpaint_shield.pde sketch instead!
// DOES NOT CURRENTLY WORK ON ARDUINO LEONARDO
#include <string.h>
#include <stdio.h>
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library
#include <TouchScreen.h>
#include <ArduinoJson.h>
@DeviNoles
DeviNoles / pipicorevbar.ino
Created August 22, 2022 22:51
pipicorevbar
#include <string.h>
#include <stdio.h>
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 0 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 15 // Popular NeoPixel ring size
@DeviNoles
DeviNoles / Client.js
Created August 18, 2022 16:47 — forked from roccomuso/Client.js
Node.js remote shell example
var net = require('net')
var readline = require('readline')
/**
* @class Client
* @param host {String} the host
* @param post {Integer} the port
*/
function Client (host, port) {
this.host = host
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
pinMode(5, OUTPUT);
delay(1000);