- Related tutorial: http://raspberrypiguide.de/
- Command Line Cheatsheet: https://gist.github.com/hofmannsven/8392477
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
| #!/usr/bin/env bash | |
| # Utility to change the connection method for a git repo. | |
| # === Colour Definitions === | |
| red='\e[0;31m' | |
| green='\e[0;32m' | |
| purple='\e[0;35m' | |
| orange='\e[0;33m' | |
| # No Color, i.e. turn off color |
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
| <snippet> | |
| <content><![CDATA[property]]></content> | |
| <tabTrigger>property</tabTrigger> | |
| <scope>source.python</scope> | |
| <description>New Property Decorator</description> | |
| </snippet> |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
| import serial # you need to install the pySerial :pyserial.sourceforge.net | |
| import time | |
| # your Serial port should be different! | |
| arduino = serial.Serial('/dev/tty.usbmodem1411', 9600) | |
| def onOffFunction(): | |
| command = raw_input("Type something..: (on/ off / bye )"); | |
| if command =="on": | |
| print "The LED is on..." | |
| time.sleep(1) |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| /** round n down to nearest multiple of m */ | |
| long roundDown(long n, long m) { | |
| return n >= 0 ? (n / m) * m : ((n - m + 1) / m) * m; | |
| } | |
| /** round n up to nearest multiple of m */ | |
| long roundUp(long n, long m) { | |
| return n >= 0 ? ((n + m - 1) / m) * m : (n / m) * m; | |
| } |