-
Instalar ffmpeg da fonte: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
-
Instalar nginx com módulo rtmp
wget http://nginx.org/download/nginx-1.9.3.tar.gz git clone https://github.com/arut/nginx-rtmp-module wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2 tar -xvf pcre-8.36.tar.bz2 tar -xvf nginx-1.9.3.tar.gz cd nginx-1.9.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
clear | |
message() { | |
echo "##################################################"; | |
echo "# #"; | |
echo "# INSTALANDO O PYTHON 3.5 #"; | |
echo "# #"; | |
echo "##################################################"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(caret) | |
library(doParallel) | |
# Enable parallel processing. | |
cl <- makeCluster(detectCores()) | |
registerDoParallel(cl) | |
# Load the MNIST digit recognition dataset into R | |
# http://yann.lecun.com/exdb/mnist/ | |
# assume you have all 4 files and gunzip'd them |
A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enter this command to create a sudoers override/include file: | |
# sudo visudo -f /etc/sudoers.d/nginx.overrides | |
# (Make sure you actually have this in your /etc/sudoers - Run `sudo visudo` to check) | |
# #includedir /etc/sudoers.d | |
# This file assumes your deployment user is `deploy` | |
# Nginx Commands | |
Cmnd_Alias NGINX_RESTART = /usr/sbin/service nginx restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ecdh = crypto.createECDH('secp256k1'); | |
ecdh.generateKeys(); | |
var publicKey = ecdh.getPublicKey(null, 'compressed'); | |
var privateKey = ecdh.getPrivateKey(null, 'compressed'); | |
console.log('Private1:', privateKey.length, privateKey.toString('hex')); | |
console.log('Public1: ', publicKey.length, publicKey.toString('hex')); | |
This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml
Myrails::Application.routes.draw do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Found in: http://blog.firsthand.ca/2010/09/ruby-rdoc-example.html | |
# * Style guide based on Rails documention | |
module Namespace #:nodoc: don't document this | |
# Generic Namespace exception class | |
class NamespaceError < StandardError | |
end | |
# Raised when... |
To enable the precompilation of all non.js/.css assets within vendor/assets
just add this to config/initializers/assets.rb
:
Rails.application.config.assets.precompile << Proc.new { |path, fn| fn =~ /vendor\/assets/ && !%w(.js .css).include?(File.extname(path)) }
Be aware that this will precompile ALL non .js/.css assets that you have there, some plugins or libraries might have .txt or other files around, and those would end up into your precompiled list also.
If you need to precompile images only, you could use this:
Rails.application.config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif)