2014-06-09

SSH-client for ChromeOS


Using Secure Shell version 0.8.27 app for ChromeOS.

The only text in the Secure Shell app that shows what it is, where it came from, or promises any information about how to use the app is printed in the Terminal window when the app is opened:

Welcome to Secure Shell version 0.8.27.
Answers to Frequently Asked Questions: http://goo.gl/TK7876

The goo.gl URL above expands to https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/faq.txt  which is a pointer into the Secure Shell app source code libraries at the Google Git repository:  
    https://chromium.googlesource.com/apps/libapps/+/master/

Cloud9

Install Cloud9 on local or remote computer, server, or raspberry pi --

2014-06-08

Internet Connection Sharing (ICS) using IPTABLES

Internet Connection Sharing - Simple iptables Example

#!/bin/sh 
# 
# internet connection sharing wlan0 is the gate way 
# eth0 is the lan port this might use a straight ethernet cable to a router wan port or a switch or a single PC
# 192.168.2.2 is the port that is being used by the lan for access I changed it to 192.168.2.254 and set fixed
# addresses for the wan and router
#
# change wlan0 to ppp0 and you can use this for mobile broadband connection sharing
#
ip link set dev eth0 up
ip addr add 192.168.2.1/24 dev eth0
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.2.2
iptables -t nat -A PREROUTING -i wlan0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.2.2
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p tcp --dport 3074 -j ACCEPT
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p udp -m multiport --dports 88,3074 -j ACCEPT

The article goes on to say...

If things go wrong, the following script should save you when things get badly messed up.

#!/bin/sh
# 
# rc.flush-iptables - Resets iptables to default values. 
# 
# Copyright (C) 2001 Oskar Andreasson 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
# Configurations
#
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P POSTROUTING ACCEPT
$IPTABLES -t mangle -P INPUT ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
$IPTABLES -t mangle -P FORWARD ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains that's not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X

2014-06-07

How to use only one instance of ssh-agent per host, purr user.

This is a script to connect to a running ssh-agent from a user shell, add the user's default DSA identity
#!/bin/sh 
# The following command returns the PID of the currently 
#   running ssh-agent process; This value needs to get stored into
#   SSH_AGENT_PID
#
# ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1
#
# The other value we want in order to be able to use an instance of 
# ssh-agent is the SSH_AUTH_SOCK value - this is a file system name 
# a socket maintained by the ssh-agent instance.  It will be in the
# ${TMP}/ directory space...
export SSH_AUTH_SOCK=`ls --color=none /tmp/ssh-*/agent.*`
export SSH_AGENT_PID=`ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1`
echo SSH_AGENT_PID: $SSH_AGENT_PID
echo SSH_AUTH_SOCK: $SSH_AUTH_SOCK
echo "Adding default .ssh/id_dsa using ssh-add..."
ssh-add
echo kthxbai.

2014-05-28

Contact for GPU / Pi Internals

 Some contact points listed here: https://github.com/hermanhermitage/videocoreiv
"Active discussions take place on IRC (freenode) on #raspberrypi-internals, #raspberrypi-osdev, #raspberrypi-dev, and #raspberrypi.
There is a raspberrypi-internals mailing list, you can subscribe at mailing list page at freelists.org."

< source: http://www.raspberrypi.org/forums/viewtopic.php?f=33&t=6188&start=100 >

The rPi GPU Firmware code repository has the VideoCore IV library code.  Note that this code is compiled as a binary for the dual-core BroadCom GPU 

The BROADCOM BCM2835: High Definition 1080p Embedded Multimedia Applications Processor GPU (used in the Raspberry Pi)

Breakdown of the device

VideoCore IV BCM2835 Overview – block diagrams & functional descriptions

OpenVX: The New Khronos API


OpenVX The New Khronos API for Computer Vision and AR

*** iz "AR" meenz "Augmented Reality" iz mebbe shud bee sum kynde uv FAQ & stuffz.  Srsly.


iz sum stuff & stuffz iz vrrr large sum text & stuffz alzo ! wtF? 

rPi fRame bUffer

 Inject a sprite into the video frame buffer at a target location matching a "hotspot" on the sprite image -- similar to the way a cursor icon has a hotspot relative to the image coordinates within a graphical user interface (GUI).

In the case of the sprite, the "hotspot" coordinates are also the drawing origin of the sprite image.

Note that the primary difference between the "icon" or "cursor" or "sprite" bitmapped image type and the more customary "web graphic" types is that the icon/cursor/sprite images are mapped onto arbitrary backgrounds using transparency and simple bit-wise logic operations.

These pixmap graphics also often rely on reduced color-counts relative to the colorspace available under e.g. current X-Windows desktops...

Sonic Pi & Stuffz

 Sonic Pi

Sonic Pi should be combined with the OTTO Camera to provide full DVI or HDMI or whatever hi-res video acquisition with stereo audio...

OTTO is a camera...
http://www.nextthing.co/otto/

2014-05-27

More OpenCV + RaspiCam

 toThinkOrNotToThink - RASPBERRY PI + SIMPLECV + OPENCV + RASPICAM CSI CAMERA  -- this project leverages the GPU and the rPi Camera (not USB) to offload graphics processing from the main processor, freeing up CPU for image analysis and computer vision tasks.   Note that the comments section contains useful information for debugging the steps in the article using updated software versions, etc.

Instructions on how to install / upgrade v4l on the Pi  How to install or upgrade UV4L on Raspbian (for the Raspberry Pi)  This item is a requirement for the project listed above.


Simplecv + Camera board guide - a simple howto for installing simplecv ******

GPU Module Introduction from OpenCV.org

2014-05-24

 OpenCV

Open Source Computer Vision Library (OpenCV) for use in robotic applications and to streamline its use in the ROS software platform


Video Tracking

 Video tracking is the process of locating a moving object (or multiple objects) over time using a camera