Note: replace {{server}} with your domain or ip
- Login as the ec2-user
ssh -i key.pem ec2-user@{{server}}
- Switch to administrator
sudo -i
#!/bin/bash | |
# -*- coding: UTF8 -*- | |
## | |
# Command-line / Shell / Bash - snippets : Cron-related snippets | |
# Tested on Debian 6 ("Squeeze") | |
# | |
# Sources : | |
# https://drupal.org/node/23714 | |
# http://www.linuxquestions.org/questions/linux-general-1/crontab-every-10-minutes-117651/ |
#!/bin/sh | |
# GENERAL COMMANDS | |
alias l='ls -AHhlp' | |
alias c='clear' | |
alias cx='chmod +x' | |
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
alias reload='source ~/.bash_profile' | |
alias release='xattr -d com.apple.quarantine' | |
alias flushdns='sudo discoveryutil udnsflushcaches' |
import Vision | |
//1 | |
let sourceImage = UIImage(named: "jony.jpg") | |
var resultImage = sourceImage | |
//2 | |
let detectFaceRequest = VNDetectFaceLandmarksRequest { (request, error) in | |
//4 | |
if let results = request.results as? [VNFaceObservation] { | |
//5 | |
for faceObservation in results { |
import os | |
import boto3 | |
from flask import Flask, render_template, request, url_for, redirect | |
app = Flask(__name__) | |
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] | |
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] | |
S3_BUCKET = os.environ['S3_BUCKET'] |
Note: replace {{server}} with your domain or ip
ssh -i key.pem ec2-user@{{server}}
sudo -i
def math(hours, wage, tax): | |
pretax = hours * wage #figures gross income | |
taxes = pretax * tax #figures how much goes into taxes | |
leftover = pretax - taxes #figures how much will be leftover | |
print "You have made $",pretax | |
print "Put $", taxes, " in the bank for taxes." | |
print "$", leftover, " is yours!!" | |
print "Figure out how much to put in the bank for taxes." | |
print "These figures are based on working in Colorado" |
#!/usr/bin/python | |
import time | |
from SimpleCV import Color, Image, np, Camera | |
cam = Camera() #initialize the camera | |
quality = 400 | |
minMatch = 0.3 | |
try: | |
password = Image("password.jpg") |