Skip to content

Instantly share code, notes, and snippets.

void main() {
Pessoa p = Pessoa("Hernand");
int a = 3;
int b = 2;
Calculadora calc = Calculadora();
int c = Calculadora.soma(a, b);
print("Soma: $c");
print("Soma: ${p.nome}");
}
ext {
localProp = new Properties()
fileName = 'local.properties'
if (project.rootProject.file(fileName).exists()) {
localProp.load(new FileInputStream(rootProject.file(fileName)))
}
groupName = "br.com.cetelem.android.components"
publishUsername = System.env.PUBLISH_USERNAME != null ? System.env.PUBLISH_USERNAME : localProp["publishUsername"] ?: ""
publishPassword = System.env.PUBLISH_PASSWORD != null ? System.env.PUBLISH_PASSWORD : localProp["publishPassword"] ?: ""
repoUrl = System.env.REPO_URL != null ? System.env.REPO_URL : localProp["repoUrl"] ?: ""
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
#!/bin/bash
set -eu
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "5000"
}
}
}
# Autocomplete
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
. /usr/local/git/contrib/completion/git-completion.bash
fi
# mostra se existem alterações no projeto (master/branch)
GIT_PS1_SHOWDIRTYSTATE=true
# necessário para o correto funcionamento da variável ‘__git_ps1’
source /usr/local/git/contrib/completion/git-prompt.sh
import Foundation
func remove(input: String, first: Int, last: Int) -> String {
// we require a variable to manipulate strings
let newString = input
// modify newString and return the result
let firstIndex = newString.index(newString.startIndex, offsetBy: first)
let lastIndex = newString.index(newString.endIndex, offsetBy: (last * -1))
func frequency(numbers: [Int]) -> [Int: Int] {
var frequencyDictionary: [Int:Int] = [:]
for number in numbers {
if let existentValue = frequencyDictionary[number] {
frequencyDictionary[number] = existentValue + 1
} else {
frequencyDictionary[number] = 1
}
}
return frequencyDictionary
//observable_get
@Bindable
#if($field.modifierStatic)
static ##
#end
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
#if ($field.boolean && $field.primitive)
is##
#else
export ANDROID_SDK=/Users/hernand/Library/Android/sdk
export ANDROID_NDK=/Users/hernand/Library/Android/sdk/ndk-bundle
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK"
# Autocomplete
#if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
# . /usr/local/git/contrib/completion/git-completion.bash
#fi
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
git init
git remote add origin $REPO_URL
//or change the url with
git remote set-url origin $REPO_URL
git add .
git commit -m "Initial commit"
git push -f origin master