This file contains hidden or 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
for filepath in $(find . -name '*.png') | |
do | |
case $filepath in | |
*/[0-9].png) | |
file="ic_weather_0$(basename $filepath)" | |
path=${filepath%/*} | |
echo "$filepath > $path/$file" | |
mv $filepath "$path/$file" | |
;; |
This file contains hidden or 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
public static void main(String[] args) throws InterruptedException { | |
AtomicInteger a = new AtomicInteger(); | |
Observable<Object> objectObservable = Observable.create(subscriber -> { | |
new Thread(() -> { | |
while(true) { | |
int i = a.incrementAndGet(); | |
try { | |
Thread.sleep(4 * 1000); |
This file contains hidden or 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
#run build and git rebase and verify all commits | |
while ./gradlew testProdReleaseUnitTest && git rebase --continue; do echo 'ok'; done; | |
#rebase my branch | |
git rebase -i origin/master |
This file contains hidden or 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
https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/todoapp/app/src/main/res | |
https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/todoapp/app/src/main/res/layout | |
https://github.com/antoniolg/androidmvp/tree/master/app/src/main/java/com/antonioleiva/mvpexample/app/main | |
https://antonioleiva.com/mvp-android/ | |
survive changes / lifecycle aware: | |
http://blog.bradcampbell.nz/mvp-presenters-that-survive-configuration-changes-part-2/ | |
https://github.com/teegarcs/RetroRx/blob/master/app/src/main/java/com/captech/retrorx/NetworkService.java | |
https://www.captechconsulting.com/blogs/a-mvp-approach-to-lifecycle-safe-requests-with-retrofit-20-and-rxjava | |
https://medium.com/google-developers/making-loading-data-on-android-lifecycle-aware-897e12760832 |
This file contains hidden or 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
def url = '.../maven-metadata.xml' | |
def metadataText = "curl ${url}".execute().text | |
def parser = new XmlParser(); | |
def xml = parser.parseText(metadataText); | |
def versions = [] | |
xml.'**'.version.each { v -> | |
versions.add(v.text()) | |
} |
This file contains hidden or 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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "f3", | |
"command": "editor.action.goToDeclaration", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "f12", | |
"command": "-editor.action.goToDeclaration", |
This file contains hidden or 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
// Place your settings in this file to overwrite the default settings | |
{ | |
"workbench.colorTheme": "Quiet Light", | |
"editor.fontSize": 13, | |
"editor.renderWhitespace": "boundary", | |
"editor.formatOnType": true, | |
"editor.formatOnPaste": true, | |
"editor.tabSize": 2, | |
"files.trimTrailingWhitespace": true, | |
"workbench.colorCustomizations": { |
This file contains hidden or 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
{ | |
"created_at":"Thu Apr 27 12:54:39 +0000 2017", | |
"id":857578741438066688, | |
"id_str":"857578741438066688", | |
"text":"RT @marianawhispers: Nunca he podido entender c\u00f3mo el amor propio en muchas mujeres va mucho despu\u00e9s del amor a un hombre.", | |
"source":"\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e", | |
"truncated":false, | |
"in_reply_to_status_id":null, | |
"in_reply_to_status_id_str":null, | |
"in_reply_to_user_id":null, |
This file contains hidden or 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
stage('UA') { | |
echo 'start' | |
def answer = userWantToKeepCluster() | |
echo "will keep cluster? $answer" | |
echo 'done' | |
} | |
def userWantToKeepCluster() { | |
try { | |
timeout(time: 1, unit: 'MINUTES') { | |
def keep = input message: 'Keep cluster?', |
This file contains hidden or 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 jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
def jobNameStartsWith = 'cp16-dataengine-gerrit' | |
Jenkins.instance.items.findAll { it.displayName.startsWith(jobNameStartsWith) } | |
.each { job -> | |
job.builds.findAll { it.isBuilding() }.each { build -> |
NewerOlder