Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.
The following steps assume you've got a set-up like mine, where:
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json | |
from flask import Flask, url_for | |
from flask_sqlalchemy import SQLAlchemy | |
""" | |
Flask-SQLAlchemy many-to-many relationship using helper table | |
http://flask-sqlalchemy.pocoo.org/2.1/models/ | |
Hippies love their dogs. |
##Using Let's Encrypt certificates with AWS API Gateway
Before starting off with API Gateway set up it's worth mentioning that certificate configuration for this particular service is so far isn't well integrated, therefore different from other AWS services. Despite it using CloudFrount to serve on custom domains it won't let you customize distributions it creates, however all the limitations of CloudFront naturally apply to API Gateway. The most important in this case is the size of the key, which is limited by 2048 bit. Many tutorials provide ready to use terminal commands that have the key size preset at 4096 bit for the sake of better security. This won't work with API Gateway and you'll get an error message about certificate's validity or incorrect chain which won't suggest you the real cause of the issue. Another consideration is that to add a custom domain to API Gateway you have to have a certif
Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
'use strict'; | |
import Promise from 'bluebird'; | |
import { map, clone } from 'lodash'; | |
import Client_SQLite3 from 'knex/lib/dialects/sqlite3'; | |
export default class Client_ReactNativeSqliteStorage extends Client_SQLite3 { | |
dialect: 'sqlite'; | |
driverName = 'react-native-sqlite-storage'; | |
_driver() { |
import {inject} from 'aurelia-framework'; | |
import {Session} from './session'; | |
@inject(Session) | |
export class Auth { | |
// App specific | |
userPoolId = 'us-east-1_fgCWraBkF'; | |
appClientId = '57lq262n28o7ddt8i36jcjj7qd'; |
import subprocess | |
import datetime | |
import numpy as np | |
THREAD_NUM=4 | |
def get_video_info(fileloc) : | |
command = ['ffprobe', | |
'-v', 'fatal', | |
'-show_entries', 'stream=width,height,r_frame_rate,duration', |