Before you begin, ensure that you've setup network access, either with ethernet or wlan.
sudo dpkg-reconfigure tzdata
Typically we use "US/Pacific-New"
#!/bin/bash | |
# usage, replace the <path to app.js file> with full path to your node app | |
# set crontab to @reboot <full path to this script> | |
# make sure to chmod +x this script to make it runnable | |
export PATH=/usr/local/bin:$PATH | |
if [ `/usr/local/bin/forever list | /usr/bin/wc -l` -le 1 ]; then | |
/usr/local/bin/forever start <path to app.js file> | |
fi |
#include <stdio.h> | |
typedef struct ret ret; | |
struct ret { | |
char *id; | |
int accel_x; | |
int accel_y; | |
int accel_z; | |
int gyro_x; |
# Utilities for quickly accessing frequently used directories in bash. | |
# Usage: | |
# $ cd /path/to/project/src/ | |
# $ mark code # Will create a new shortcut. | |
# # Becomes interactive if a shortcut already exists | |
# # m is an alias for mark. You can also `m code` | |
# | |
# $ code # From now on, running this anywhere in the shell | |
# # will put you in /path/to/project/src/code |
# Create an SSH key. | |
ssh-keygen | |
# Copy this to the GitHub SSH key page. | |
cat ~/.ssh/id_rsa.pub | |
# Clone a git repository with SSH. | |
git clone [email protected]:tlevine/foobar.git |
################################################################################ | |
# showdata.py | |
# | |
# Display analog data from Arduino using Python (matplotlib) | |
# | |
# electronut.in | |
# | |
################################################################################ | |
import sys, serial |
// analog-plot | |
// | |
// Read analog values from A0 and A1 and print them to serial port. | |
// | |
// electronut.in | |
#include "Arduino.h" | |
void setup() | |
{ |
################################################################################ | |
# showdata.py | |
# | |
# Display analog data from Arduino using Python (matplotlib) | |
# | |
# electronut.in | |
# | |
################################################################################ | |
import sys, serial |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.JLabel; | |
public class SwingHelloWorld extends JFrame{ | |
public static void main(String[] args){ | |
SwingHelloWorld frame = new SwingHelloWorld("Hello"); | |
frame.setVisible(true); | |
} |