This file contains 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
<EditText ... | |
android:clickable="true" | |
android:cursorVisible="false" | |
android:focusable="false"/> |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Copy env variables to app module gradle properties file | |
# | |
set +x // dont print the next lines on run script | |
printenv | tr ' ' '\n' > app/gradle.properties | |
set -x |
This file contains 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
#!/usr/bin/env ruby | |
# | |
# Convert blogger (blogspot) posts to jekyll posts | |
# | |
# Basic Usage | |
# ----------- | |
# | |
# ./blogger_to_jekyll.rb feed_url | |
# | |
# where `feed_url` can have the following format: |
This file contains 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
class Person { | |
Person(this.name); | |
final String name; | |
String toString() => name; | |
} | |
void main() { | |
final items = [Person("juan"), Person("pedro"), Person("coso")]; |
This file contains 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
Stream<String> otherNumbers() { | |
return Stream.fromIterable(["2", "3"]); | |
} | |
Stream<String> allNumbers() async* { | |
yield "1"; | |
yield* otherNumbers(); | |
} |
This file contains 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
import static java.lang.Math.acos; | |
import static java.lang.Math.cos; | |
import static java.lang.Math.sin; | |
/** | |
* Calculate distance between coordinates. | |
*/ | |
public class DistanceCalculator { | |
static double PI_RAD = Math.PI / 180.0; |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Runs dartfmt from dart_style to check if all of the source files are well formatted | |
# Requires you to have dartfmt already in your path with 'pub global activate dart_style' | |
# | |
echo "-> Running 'flutter format' to check project dart style 🤓" | |
RESULT=$(flutter format -n lib/main.dart lib/src/ test/) |
This file contains 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
extension String { | |
var isBlank: Bool { | |
get { | |
let trimmed = stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) | |
return trimmed.isEmpty | |
} | |
} | |
This file contains 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
project.afterEvaluate { | |
// Grab all build types and product flavors | |
def buildTypes = android.buildTypes.collect { type -> type.name } | |
def productFlavors = android.productFlavors.collect { flavor -> flavor.name } | |
// When no product flavors defined, use empty | |
if (!productFlavors) productFlavors.add('') | |
productFlavors.each { productFlavorName -> | |
buildTypes.each { buildTypeName -> |