(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
This configuration is no longer updated
| func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) { | |
| outputFilename := generateFilename("mp4") | |
| // Actually start the command. | |
| cmd := exec.Command("ffmpeg", | |
| // Read input from stdin. | |
| "-i", "-", | |
| // ... environment-specific ffmpeg options ... | |
| "-y", outputFilename) |
| user web; | |
| # One worker process per CPU core. | |
| worker_processes 8; | |
| # Also set | |
| # /etc/security/limits.conf | |
| # web soft nofile 65535 | |
| # web hard nofile 65535 | |
| # /etc/default/nginx |
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
| package main | |
| const MaxLength = 1 << 20 | |
| var ( | |
| addr = flag.String("listen", ":8000", "listen for requests") | |
| numprocs = flag.Int("p", runtime.NumCPU(), "number of workers to start") | |
| maxqueue = flag.Int("q", runtime.NumCPU()*2, "largest queue size") | |
| jobs chan Job |
| from boto.cloudfront.distribution import Distribution | |
| from cryptography.hazmat.primitives.asymmetric import padding | |
| from cryptography.hazmat.primitives import serialization | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes | |
| import base64 | |
| class BetterThanBoto(Distribution): | |
| def sign_rsa(self, message): |
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
| #!/bin/bash | |
| echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n" | |
| launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist | |
| launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist | |
| echo "\n\n--- Done! ---\n\n" |