The linux kubectl binary can be fetched with a command like:
curl -O https://storage.googleapis.com/kubernetes-release/release/v1.4.5/bin/linux/amd64/kubectl
On an OS X workstation, replace linux in the URL above with darwin:
{ | |
"took":47, | |
"timed_out":false, | |
"_shards":{ | |
"total":5, | |
"successful":5, | |
"failed":0 | |
}, | |
"hits":{ | |
"total":159215, |
#!/usr/bin/env ruby | |
require 'benchmark' | |
REGEXPS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
/^Missing API definition file in (.+)$/i, | |
/^cannot load such file -- (.+)$/i, | |
] |
class UserBuilder < Untied::Consumer::Observer | |
observe :user, :from => "social-network" | |
def build(attrs) | |
LeanUser.new(external_id: attrs[:id], name: attrs[:first_name]) | |
end | |
alias_method :after_create, :build | |
end |
.data | |
entrada: .asciiz "acd" | |
nextline: .asciiz "\n" | |
.text | |
main: | |
addi $t0, $zero, 0 # Inicializa contador ($t0) com 0, just in case. | |
change_case: | |
lb $t1, entrada($t0) # Armazena caractere em $t1 | |
beq $t1, 0, sort # Sai do loop change_case se entrada[$t0] for 0 |
"links": [ | |
{ | |
"rel": "self", | |
"href": "http://www.redu.com.br/api/subjects/4723" | |
}, | |
{ | |
"rel": "lectures", | |
"href": "http://www.redu.com.br/api/subjects/4723/lectures" | |
}, | |
{ |
import java.util.Scanner; | |
import wrapper.Management; | |
public class main { | |
/** | |
* @param args | |
*/ |
Este projeto consiste na criação de um encapsulador para a API REST do Mural do Redu.
Encapsuladores (para APIs REST), também conhecidos como wrappers, são bibliotecas que abstraem detalhes de rede na comunicação com serviços terceiros.
Por exemplo, para criar um post no mural de um usuário no Redu é necessário realizar uma requisição HTTP do tipo POST para a URL http://redu.com.br/api/users/:user_id/statuses passando-se como payload o seguinte json: