View jenkins.sh
#!/bin/bash -l
set -e # fail on error
set -u # do not allow unset variables
# use the correct exit code, when piping commands, e.g.
# here you use curl ... | python... so if curl fails, python will still
# continure working
set -o pipefail
View dinamic.js
function fibCreate() {
return function fibonacci(num) {
if (num <= 1) return 1;
return fibonacci(num - 1) + fibonacci(num - 2);
};
}
for (var i = 0, len = 40; i < len; i++) {
fibCreate()(i);
View AGeneraInternationalAddress.js
// This is the common field set free of country specific things.
function GeneralInternationalAddress(props) {
return (
<Fragment>
<AddressLineInput value={props.address_line} />
<AddressLineInput
name="address_line2"
value={props.address_line2}
optional
View CountryAddressForm.js
// CountryAddressForm.js
return (
<form
className="country-form"
action="#"
method="post"
onSubmit={this.handleSubmit.bind(this)}
onChange={this.handleChange.bind(this)}>
View CountryAddressForm.js
// CountryAddressForm.js
render() {
return (
<form action="#"
onSubmit={this.handleSubmit.bind(this)}
onChange={this.handleChange.bind(this)}>
<CountrySelector name="country" countries={countries} />
<AddressLineInput name="address_line" value={this.state.address_line} />
View CountryAddressForm.js
// CountryAddressForm.js
const COUNTRY_REGIONS = { IE:[], SP:[], IT:[] };
render() {
return(
<form action="#"
onSubmit={this.handleSubmit.bind(this)}
onChange={this.handleChange.bind(this)}>
<CountrySelector name="country" countries={countries} />
View CountryAddressForm.js
// CountryAddressForm.js
// Common most used address format
// ...
render() {
return (
<form action="#"
onSubmit={this.handleSubmit.bind(this)}
onChange={this.handleChange.bind(this)}>
View map_copy.go
package main
import (
"bytes"
"encoding/gob"
"fmt"
"log"
)
func main() {
View script.sh
# Esta não retorna resultados
curl -v -X POST \
-d \
'{"search":{"pattern":"da","target":"http://semantica.globo.com/G1/cita_a_entidade","fields":["rdfs:label","base:dados_buscaveis"],"graphs":["http://semantica.globo.com/G1/"]},"response":{"classes":[{"@type":"http://semantica.globo.com/base/Organizacao","instance_fields":["http://semantica.globo.com/base/sameAs","http://semantica.globo.com/base/data_de_fundacao","http://semantica.globo.com/base/descricao","http://semantica.globo.com/G1/genero_gramatical","http://semantica.globo.com/G1/path_topico","http://semantica.globo.com/base/twitter","http://semantica.globo.com/base/url_do_permalink","http://semantica.globo.com/base/nome_completo","http://semantica.globo.com/G1/foto_perfil","http://semantica.globo.com/base/dados_buscaveis","http://semantica.globo.com/base/sigla","http://www.w3.org/2000/01/rdf-schema#label"]},{"@type":"http://semantica.globo.com/base/Criatura","instance_fields":["http://semantica.globo.com/base/sameAs","http://semantica.globo.com/bas
View cron.sh
#!/bin/bash
# usage: cron.sh <your_command> <sleep_duration>
while :;
do
clear
date
$1
sleep $2
done