grep

$ curl -L https://tinyurl.com/zeyq9vc | grep fish
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
1 916k 1 16384 0 0 11778 0 0:01:19 0:00:01 0:01:18 11778bluefish
bluefish’s
bluefishes
catfish
catfish’s
catfishes
codfish
codfish’s
codfishes
crawfish
crawfish’s
crawfishes
crayfish
crayfish’s
crayfishes
cuttlefish
cuttlefish’s
cuttlefishes
dogfish
dogfish’s
dogfishes
dwarfish
elfish
fish
fish’s
fishbowl
fishbowl’s
fishbowls
fished
fisher
fisher’s
fisheries
fisherman
fisherman’s
fishermen
fishers
fishery
fishery’s
fishes
fishhook
fishhook’s
fishhooks
fishier
fishiest
fishing
fishing’s
fishnet
fishnet’s
fishnets
fishtail
fishtailed
fishtailing
fishtails
fishwife
fishwife’s
fishwives
fishy
flatfish
flatfish’s
flatfishes
goldfish
goldfish’s
goldfishes
jellyfish
jellyfish’s
jellyfishes
kingfisher
kingfisher’s
kingfishers
62 916k 62 575k 0 0 246k 0 0:00:03 0:00:02 0:00:01 596koafish
raffish
sailfish
sailfish’s
sailfishes
selfish
selfishly
selfishness
selfishness’s
shellfish
shellfish’s
shellfishes
silverfish
silverfish’s
silverfishes
standoffish
starfish
starfish’s
starfishes
sunfish
sunfish’s
sunfishes
swordfish
swordfish’s
swordfishes
unselfish
unselfishly
unselfishness
unselfishness’s
weakfish
weakfish’s
weakfishes
whitefish
whitefish’s
whitefishes
wolfish
100 916k 100 916k 0 0 341k 0 0:00:02 0:00:02 –:–:– 694k

$ numers='one two three'
$ echo $numers
one two three

$ echo $LINES x $COLUMNS
24 x 80
$ echo $PATH
$ ls bin
http://bashrcgenerator.com

$ alias ll=’ls -la’
$ ll

The Bash Academy
Bash Beginners Guide
Bash Programming HOWTO
Regexr — Learn Regular Expressions

Cat

cat -> catenate, Concatenate
$ cat dictionary.txt

rm -> remove
$ rm SillyFile.txt
$ rm -i ValuableFile.txt

$ rm -i google.html
rm: remove regular file 'google.html'? y

$ rmdir hogehoge

$ grep shell dictionary.txt
bombshell
bombshell’s
bombshells
bushelled
bushelling
cockleshell
cockleshell’s
cockleshells
eggshell
eggshell’s
eggshells
nutshell
nutshell’s
nutshells
seashell
seashell’s
seashells
shell
shell’s
shellac
shellac’s
shellacked
shellacking
shellacs
shelled
sheller
shellfish
shellfish’s
shellfishes
shelling
shells
tortoiseshell
tortoiseshell’s
tortoiseshells

curl

curl -> C URL -> see URL

$ curl 'http://google.com'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   259  100   259    0     0   1106      0 --:--:-- --:--:-- --:--:--  2072
302 Moved

302 Moved

The document has moved here.
$ curl -o google.html -L 'http://google.com'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   261  100   261    0     0   1197      0 --:--:-- --:--:-- --:--:--  1864
100 10726    0 10726    0     0  17612      0 --:--:-- --:--:-- --:--:-- 85808
$ curl -L -o dictionary.txt 'https://tinyurl.com/zeyq9vc'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100  916k  100  916k    0     0   217k      0  0:00:04  0:00:04 --:--:--  598k

Opening Git Bash

$ echo Hello, shello!
Hello, shello!

this is wired, isn’t it?

$ echo Hello, shello!!
echo Hello, shelloecho Hello, shello!
Hello, shelloecho Hello, shello!

improve with single quote

$ echo 'Hello, shello!!'
Hello, shello!!

ls = list
$ ls
$ ls Downloads

cd = Change Directory
$ cd Downloads
$ cd .. ; ls

pwd = Print Working Directory
“ls .” is just same as “ls”
$ ls .

all of the files matched pdf.
$ ls -l Documents/*.pdf

$ mkdir Documents/Books
$ mv 'Documents/1911 Webster Dictionary.epub' Documents/Books/
$ mv Documents/*.epub Documents/Books

Unix shell

> echo "Hello, $LOGNAME"
Hello, Karl
> git clone https://github.com/*

Needs to remember the words like below
less, ls, pwd, mkdir, cat, curl, echo, git

console.log("hello!");
hello!

bash

Research

Brain Storm -> Create a Skelelon UI -> Research APIs and Libraries
Choose an Idea -> Create a paper prototype -> get user feedback -> Build APP

Developing nice graphic design
Building the user interface with UIKit
Downloading data from an API
Persisting the data
Working through problems and bug to get the app working well.
Posting the app to the App Store

-Create a Paper Prototype

Default Befaviors

Street Names
isStreetNamesEnabled()
setStreetNamesEnabled(boolean)
Zoom Gestures
isZoomGesturesEnabled
setZoomGesturesEnabled(boolean)
User Navigation
isUserNavigationEnabled
setUserNavigationEnabled(boolean)

@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama){

	panorama.setPosition(new LatLng(37.400546,-112.108668));
	panorama.setStreetNamesEnabled(false);
	StreetViewPanoramaCamera camera = new StreetViewPanoramaCamera.Builder()
		.bearing(180)
		.build();
	panorama.animateTo(camera,1000);
}

User Interaction
Detect Camera Changes
setOnStreetViewPanoramaCameraChangeList
Detect User Touches on Panorama
setOnStreetViewPanoramaClickListener
Detect Changes to the Panorama
setOnStreetViewPanoramaChangeListener

Adding a Polyline

PolylineOptions().geodesic(true).add(LatLng);
PolylineOptions().geodesic(true).add(LatLng)
								.add(LatLng)
								.add(LatLng)
								.add(LatLng);

Use a streetViewPanoramaFragment

<fragment
	android:name="com.google.adroid.gms.maps.StreetViewPanoramaFragment"
	android:id="@+id/streetviewpanorama"
	android:layout_width="match_parent"
	android:layout_height="match_parent" />

StreetView Main Activity
Edit Activity
Implement OnStreetViewPanoramaReadyCallback
In OnCreate
Create a StreetViewPanoramaFragment Object
Call .getStreetViewPanoramaAsync(this) on it
Override onStreetViewPanoramaReady
Parameter: StreetViewPanorama
setPosition() for Location
Create a StreetViewPanoramaCamera
animate To(camera, ms)

@Override
prtected void onCreate(Bundle savedInstanceState){
 StreetViewPanoramaFragment StreetViewPanoramaFragment
  (StreetViewPanoramaFragment) getFragmentManager()
  	.findFragmentById(R.id.streetviewpanorama);

  	streetViewPanoramaFragment.getStreetViewPanoramaAsync(this);
 }

@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama){

	panorama.setPosition(new LatLng(36.0579667,-112.1430996));
	StreetViewPanoramaCamera camera = new StreetViewPanoramaCamera.Builder()
		.bearing(180)
		.build();
	panorama.animateTo(camera,1000);
}

Using MarkerOptions

MarkerOptions class
position property takes a LatLng
title property takes a string

MarkerOptions renton =
	new MarkerOptions()
		.position(new LatLng(47.89805,-122.120502))
		.title("renton");
renton = new MarkerOptions()
	.position(new LatLng(47.48905, -122.120502))
	.title("Renton");
renton = new MarkerOptions()
	.position(new LatLng(47.48905, -122.120502))
	.title("Renton")
	.icon(BitmapDescriptorFactory.fromResource(
		R.drawable.ic_launcher));

Camera Position

Target, Zoom, Bearing, Tilt
class code: CameraPosition

CameraPosition cp=CameraPosition.builder()
	.target(LatLong)
	.zoom(val)
	.bearing(val)
	.tilt(val)
	.build();

	map.moveCamera(CameraUpdateFactory.newCameraPosition(cp));

	map.animateCamera(CameraUpdateFactory.newCameraPosition(cp),
		<time in ms>, <callback function>);

Making the map move
Seattle: 47.6204, -122.3491
New York: 40.7127, 74.0059
Dublin: 53,3478, 6.2597