create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| #!/usr/bin/env python | |
| import datetime | |
| from sqlalchemy import create_engine | |
| from sqlalchemy import Column, Integer, String, DateTime | |
| from sqlalchemy.schema import CheckConstraint | |
| from sqlalchemy.orm import validates | |
| from sqlalchemy.orm import sessionmaker | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.exc import IntegrityError |
| hanxue-mac:Github hanxue$ git clone https://github.com/AppScale/appscale.wiki.git | |
| Cloning into 'appscale.wiki'... | |
| remote: Counting objects: 1745, done. | |
| remote: Compressing objects: 100% (1733/1733), done. | |
| remote: Total 1745 (delta 1089), reused 10 (delta 4) | |
| Receiving objects: 100% (1745/1745), 267.93 KiB | 35.00 KiB/s, done. | |
| Resolving deltas: 100% (1089/1089), done. | |
| Checking connectivity... done | |
| hanxue-mac:Github hanxue$ ls appscale.wiki/ | |
| .git/ |
This can be used to daemonize anything that would normally run in the foreground; I picked Redis. Put this in /etc/systemd/system/redis.service:
[Unit]
Description=Redis
After=syslog.target
[Service]
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
RestartSec=5s
| import getpass | |
| import sys | |
| import paramiko | |
| LOCAL= '' | |
| REMOTE = '' | |
| def copy_file(host, port, username, password, src, dest): | |
| client = paramiko.SSHClient() | |
| client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) |
| #!/usr/bin/env python | |
| # Before you run this script make sure Flask-SQLAlchemy is installed in | |
| # your virtual environment | |
| from flask import Flask | |
| from flask_sqlalchemy import SQLAlchemy | |
| app = Flask(__name__) | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' # in-memory |