Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
var express = require('express'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var key = "[api-key]"; | |
var secret = "[api-secret]"; | |
var request = new oauth.OAuth(null, null, key, secret, '1.0', null, 'HMAC-SHA1'); | |
app.get('/api-request', function(req, res){ | |
request.get( | |
"http://127.0.0.1:8000/api/1.0/data.json", |
cd /usr/bin | |
sudo ./sakis3g connect APN="uninet" APN_USER="APN_USER" APN_PASS="APN_PASS" --console; python startup_mailer.py | |
ssh -f -N -T -R22222:localhost:22 amazon | |
ssh -p 22222 pi@localhost |
#include <SoftwareSerial.h> | |
#define rxpin 2 | |
#define txpin 3 | |
//add the soft serial library | |
//set the RX pin to pin 2 | |
//set the TX pin to pin 3 | |
SoftwareSerial myserial(rxpin, txpin); | |
//enable the soft serial port | |
String inputstring = ""; | |
String sensorstring = ""; |
有几点在ubuntu要注意: | |
1: | |
在chrome里打 /etc/network/interfaces | |
应该看到: | |
auto lo | |
iface lo inet loopback | |
2: | |
在ubuntu connect wifi哪里 有一个Edit Connections | |
在wired tab |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
From 7341a316c38a61cc745ce04e618916677007883b Mon Sep 17 00:00:00 2001 | |
From: Timothy Brom <[email protected]> | |
Date: Wed, 29 Feb 2012 11:29:55 -0500 | |
Subject: [PATCH] Fixed error about strexh and strexb using the same register | |
--- | |
example/libs_stm/inc/core_support/core_cm3.c | 4 ++-- | |
1 files changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/example/libs_stm/inc/core_support/core_cm3.c b/example/libs_stm/inc/core_support/core_cm3.c |
#include <stdio.h> | |
#include <mosquitto.h> | |
void my_message_callback(struct mosquitto *mosq, void *obj, const struct mosquitto_message *message) | |
{ | |
if(message->payloadlen){ | |
printf("%s %s\n", message->topic, message->payload); | |
}else{ | |
printf("%s (null)\n", message->topic); | |
} |
This is a simple example of the MQTT protocol with Node.js. The client code has also been tested with a combination of C++ servers and clients.
cd; | |
// wget http://www.open.com.au/mikem/bcm2835/bcm2835-1.5.tar.gz; // My Pi can't figure out this URL | |
wget http://67.192.60.197/mikem/bcm2835/bcm2835-1.8.tar.gz | |
tar xvfz bcm2835-1.8.tar.gz; | |
cd bcm2835-1.8; | |
./configure; | |
make; | |
sudo make install |
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node | |
./configure | |
make | |
sudo make install | |
# install the Node package manager for later use |