Command Flags
| Flag | Options | Description |
|---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
| Ruby e Rails | |
| Guias: | |
| http://guides.rubyonrails.org/ | |
| Livros (Free mas vale pagar um café para o autor ;) ): | |
| https://leanpub.com/conhecendo-ruby | |
| Livros (Pagos): | |
| https://leanpub.com/conhecendo-rails |
Command Flags
| Flag | Options | Description |
|---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
| defmodule Poker do | |
| ## Rank a poker hand | |
| ## | |
| ## Card is {:suit, value}, e.g. {:heart, 3} | |
| ## Hand is a list of 5 cards | |
| ## | |
| ## Poker.rank [{:heart, 10}, {:club, 11}, {:heart, 9}, {:diamond, 12}, {:heart, 13}] | |
| ## >> :straight | |
| def rank(hand) do |
| # frozen_string_literal: true | |
| class Things::Something | |
| Result = Data.define(:thing, :errors) do | |
| def initialize(thing: nil, errors: []) | |
| super | |
| end | |
| def successful? | |
| errors.empty? |
| sns.publish({ | |
| TargetArn: device.arn, | |
| MessageStructure: 'json', | |
| Message: JSON.stringify({ | |
| default: 'you will never see this muah!', | |
| APNS_SANDBOX: JSON.stringify({ | |
| aps: { | |
| 'alert': '', | |
| 'content-available': 1 | |
| }, |
| // sending to sender-client only | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
| # coding: utf-8 | |
| import os | |
| import StringIO | |
| from xhtml2pdf import pisa | |
| from xhtml2pdf.pdf import pisaPDF | |
| from django.template.loader import render_to_string | |
| from django.conf import settings | |