create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| /** 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; | |
| } |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| 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) |
| #!/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 <rthijssen@gmail.com>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| <snippet> | |
| <content><![CDATA[property]]></content> | |
| <tabTrigger>property</tabTrigger> | |
| <scope>source.python</scope> | |
| <description>New Property Decorator</description> | |
| </snippet> |
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 |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |