View dump-agp-sources.gradle
/** | |
* 1) Change agpVersion | |
* 2) Run './gradlew dumpSources' | |
* 3) Check changeset into source control | |
*/ | |
def agpVersion = 'UPDATE_THIS' | |
repositories { | |
google() | |
jcenter() |
View kt2java_diff_hack.sh
#!/usr/bin/env bash | |
# Find all added *.kt files from last commit and mv to *.java | |
for f in $(git diff --name-status --diff-filter='A' HEAD~ "*.kt" | cut -f 2); | |
do mv -- "$f" "${f%.kt}.java"; | |
done | |
# Commit the kt to java changes | |
git add . | |
git commit -m"kt to java" |
View image_diff.sh
convert '(' ~/Desktop/before.png -flatten -grayscale Rec709Luminance ')' \ | |
'(' ~/Desktop/after.png -flatten -grayscale Rec709Luminance ')' \ | |
'(' -clone 0-1 -compose darken -composite ')' \ | |
-channel RGB -combine ~/Desktop/diff.png |
View build.gradle
def agpVersion = '3.5.0-alpha03' | |
repositories { | |
google() | |
jcenter() | |
} | |
configurations { | |
agp | |
} |
View task_graph.groovy
gradle.taskGraph.whenReady { | |
println "rootProject: " + rootProject.name | |
println "childProjects: " + rootProject.childProjects | |
def dot = new File(rootProject.buildDir, 'project.dot') | |
dot.delete() | |
def command = "./gradlew " + gradle.startParameter.getTaskNames().join(" ") | |
println "command: " + command |
View geny.sh
#!/bin/bash | |
GMTOOL=/Applications/Genymotion.app/Contents/MacOS/gmtool | |
UUIDS=() | |
NAMES=() | |
INDEX=0 | |
while read -r line; do | |
UUIDS[${#UUIDS[@]}]=$(echo -n $line | cut -f1 -d'|') |
View YouTubeCrawler.java
import com.google.api.client.googleapis.json.GoogleJsonResponseException; | |
import com.google.api.client.http.HttpRequest; | |
import com.google.api.client.http.HttpRequestInitializer; | |
import com.google.api.client.http.HttpTransport; | |
import com.google.api.client.http.javanet.NetHttpTransport; | |
import com.google.api.client.json.JsonFactory; | |
import com.google.api.client.json.jackson2.JacksonFactory; | |
import com.google.api.client.util.DateTime; | |
import com.google.api.services.youtube.YouTube; | |
import com.google.api.services.youtube.model.PageInfo; |