This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ffmpeg = require('fluent-ffmpeg'); | |
const c = new ffmpeg('video1.mp4') | |
.addInput('video2.mp4') | |
.on('error', function(err) { | |
console.log('an error happened: ' + err.message); | |
}) | |
.on('end', function() { | |
console.log('final video saved'); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
const chalk = require('chalk'); | |
const del = require('del'); | |
const fs = require('fs'); | |
const google = require('googleapis'); | |
const googleAuth = require('google-auth-library'); | |
const _ = require('lodash'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM resin/%%RESIN_MACHINE_NAME%%-node:6.9.1 | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
chromium-browser \ | |
fbset \ | |
htop \ | |
libnss3 \ | |
libraspberrypi-bin \ | |
lsb-release\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = [ | |
'https://api.spark.io/v1/devices/', | |
'2d0056001551353531343431', | |
'/message' | |
].join(''); | |
var postParams = [ | |
'access_token=', | |
process.env.SPARK_CORE_TOKEN, | |
'¶ms=', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the RPi.GPIO and OS | |
import RPi.GPIO as GPIO | |
import os | |
import sys | |
import time | |
# GPIO port setup | |
GPIO.setmode(GPIO.BCM) | |
# Power switch: will send a shutdown message to the OS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int sensorPin = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
//getting the voltage reading from the temperature sensor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x08, 0xA1 }; | |
char server[ ]= "api.mongolab.com"; | |
EthernetClient client; | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int M1dirpin = 4; | |
int M1steppin = 5; | |
void setup() | |
{ | |
pinMode(M1dirpin,OUTPUT); | |
pinMode(M1steppin,OUTPUT); | |
digitalWrite(M1dirpin,LOW); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
var gpio = require('gpio'); | |
var filePath = path.join(process.cwd(), 'log.csv'); | |
var tempSensor = gpio.export(4, { | |
direction: 'in', | |
interval: 5000, | |
ready: startApp | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfasdfgfg |
NewerOlder