Skip to content

Instantly share code, notes, and snippets.

View vicatcu's full-sized avatar

Victor Aprea vicatcu

View GitHub Profile
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp:634: warning: comparison between signed and unsigned integer expressions
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp:658: warning: comparison between signed and unsigned integer expressions
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp:664: warning: comparison between signed and unsigned integer expressions
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp:695: warning: comparison between signed and unsigned integer expressions
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp:696: warning: comparison between signed and unsigned integer expressions
J:\Users\VIC\Documents\Arduino\libraries\WildFire_CC3000_Library\utility\wlan.cpp: In function 'long int wlan_ioctl_set_scan_params(long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long int, long unsigne
0000: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0010: 0x00 0x72 0x00 0x46 0xFE 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0020: 0x10 0x33 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0030: 0x00 0x41 0x00 0x46 0xFE 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0040: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0050: 0x12 0xD1 0xFF 0x29 0x51 0x39 0x61 0x31 0x95 0xF6 0x20 0xE8 0x03 0x30 0x32 0xA0
0060: 0x38 0x03 0x49 0x71 0xA0 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0070: 0x40 0x41 0x00 0x46 0xFE 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0080: 0x06 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x40 0x1F 0x21 0x22 0x22
0090: 0x00 0x00 0x00 0xE0 0xF3 0x00 0x00 0x40 0x28 0xE3 0x00 0x40 0x00 0x00 0x00 0x00
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.setDebugOutput(true);
}
void loop() {
// put your main code here, to run repeatedly:
}
@vicatcu
vicatcu / tftpd-hpa-cmd-fail
Created September 29, 2012 05:09
tftpd command fail
vic@VictorAsus:~$ /etc/init.d/tftpd-hpa restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service tftpd-hpa restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop tftpd-hpa ; start tftpd-hpa. The restart(8) utility is also available.
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.123" (uid=1000 pid=5383 comm="stop tftpd-hpa ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
int gpio0 = 21;
int enable = 23;
enum {uart, flash} mode = flash;
void setup() {
Serial.begin(115200);
if(mode == flash){
Serial1.begin(76800);
@vicatcu
vicatcu / daycounter_example.ino
Created October 31, 2013 16:32
displayTime function using 4 day chained counters
#include <DayCounter.h>
#include <ShiftRegister.h>
/* * * * * * * * * * * * * * * * * *
* pin 5 = DayCounter.SER (data) *
* pin 7 = DayCounter.CLK (clock) *
* pin 9 = DayCounter.RCK (latch) *
* * * * * * * * * * * * * * * * * */
DayCounter dc(5, 7, 9);
int count = 0;
return Promise.try(function () {
//return fs.readFileAsync(status.filename, 'utf8');
return MongoClient.connectAsync(MONGODB_CONNECTION_STRING)
.then(function(db){
return db.collection("downloads").findOneAsync({key: status.filename});
});
}).then(function(content) {
// ...
});
return Promise.try(function () {
//return fs.readFileAsync(status.filename, 'utf8');
return MongoClient.connectAsync(MONGODB_CONNECTION_STRING).then(function(db){
var results = null;
return Promise.try(function(){
return db.collection("downloads").findOneAsync({key: status.filename});
}).then(function(item){
results = item;
return db.closeAsync();
}).then(function(){
@vicatcu
vicatcu / blah.js
Last active January 13, 2016 16:05
var config = require('../../eggdataconfig')();
var express = require('express');
var router = express.Router();
var Promise = require("bluebird");
var bhttp = Promise.promisifyAll(require("bhttp"));
function urlParams(params){
var ret = "";
if(Object.keys(params).length > 0){ // if there are any optional params
ret += '?';
gulp.task("babel-routes", function () {
return gulp.src("routes/*.es6")
.pipe(babel())
.pipe(gulp.dest("routes/"));
});
gulp.task("babel-public-javascripts", function () {
return gulp.src("public/javascripts/**/*.es6")
.pipe(babel())
.pipe(gulp.dest("public/javascripts/"));