-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathlong_commands.txt
84 lines (61 loc) · 1.71 KB
/
long_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Long linux commands from the book The Raspberry Pi Cookbook
This is where you can find long commands used in the book and paste them into a terminal.
- something thats a bit tricky with a paper book.
Chapter 2
=========
Recipe 2.10 - File Sharing on a Mac Network
------------
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</service-group>
Chapter 3
=========
Recipe 3.23 - Running a Program or Script Automatically as a Service
------------
### BEGIN INIT INFO
# Provides: my_server
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple Web Server
# Description: Simple Web Server
### END INIT INFO
#! /bin/sh
# /etc/init.d/my_server
export HOME
case "$1" in
start)
echo "Starting My Server"
sudo /usr/bin/python /home/pi/myserver.py 2>&1 &
;;
stop)
echo "Stopping My Server"
PID=`ps auxwww | grep myserver.py | head -1 | awk '{print $2}'`
kill -9 $PID
;;
*)
echo "Usage: /etc/init.d/my_server {start|stop}"
exit 1
;;
esac
exit 0
# Chapter 8
Recipe XX
Installing Simple CV
$ sudo apt-get update
$ sudo apt-get install ipython python-opencv python-scipy
$ sudo apt-get install python-numpy python-setuptools python-pip
$ sudo pip install svgwrite
$ sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master --no-cache-dir
$ pip install 'IPython==4' --force-reinstall
Recipe XX
Installing Tesseract
$ sudo apt install tesseract-ocr
$ sudo apt install libtesseract-dev