I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI
. uWSGI
talks tonginx
.
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
# Source from https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide | |
#Remove any existing packages: | |
sudo apt-get remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
#Get the dependencies (Ubuntu Desktop users): | |
sudo apt-get update | |
sudo apt-get -y install autoconf build-essential checkinstall git libass-dev libfaac-dev \ |
type Any interface{} | |
// Queue is a basic FIFO Queue | |
type Queue struct { | |
nodes []Any | |
size int | |
head int | |
tail int | |
count int | |
} |
recv := make(chan int) | |
send := make(chan int) | |
go func() { | |
queue = make([]int, 0) | |
done := false | |
for !done { | |
if len(queue) == 0 { | |
select { |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
func readLine(path string) { | |
inFile, _ := os.Open(path) | |
defer inFile.Close() | |
scanner := bufio.NewScanner(inFile) | |
scanner.Split(bufio.ScanLines) | |
for scanner.Scan() { | |
fmt.Println(scanner.Text()) | |
} | |
} |
#!/bin/bash | |
# From here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# Based on: https://github.com/saxenap/install-redis-amazon-linux-centos | |
# Thanks to https://raw.github.com/gist/2776679/b4f5f5ff85bddfa9e07664de4e8ccf0e115e7b83/install-redis.sh | |
# Uses redis-server init script from https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
############################################### | |
# To use: | |
## wget https://raw.github.com/jorgerc/install-redis-amazon-linux-centos/master/redis-install-script.sh | |
## chmod 777 redis-install-script.sh | |
## ./redis-install-script.sh |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"