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
// parameters of the function | |
var repo = request.params.repo; // 'user_or_org/repo_name' | |
var slackWebhook = request.params.slackWebhook; // e.g. 'https://hooks.slack.com/services/XXX' | |
var repoUrl = 'https://api.github.com/repos/' + repo; | |
// Set the following names to match your own scheme | |
var className = 'RepoStars'; // LeanCloud class for storing repo stars | |
var fieldRepo = 'repo'; // LeanCloud field to store the repo name | |
var fieldStars = 'count'; // LeanCloud field to store the count of stars |
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
apply from: "$snippetsRepo/gaelyk-prj.gradle" | |
buildscript { | |
apply from: "$snippetsRepo/gaelyk-buildscript.gradle" | |
} |
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
cd /tmp | |
pwd | |
#Download Android SDK from Google and unzip it | |
wget http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | |
tar zxvf android-sdk_r24.1.2-linux.tgz | |
rm android-sdk_r24.1.2-linux.tgz | |
#Set extracted SDK location to $PATH so we can use commands | |
export ANDROID_HOME="/tmp/android-sdk-linux" | |
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH" |
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
find logs -name "*.log" -mtime 30 -exec rm {} \; |
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
#!/bin/bash | |
mongoctl connect `heroku config | grep -Po '(?<=MONGOLAB_URI: ).+'` |
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
apply plugin: 'com.android.library' | |
ext { | |
generatedSourcesDir = file 'gen/main/java' | |
} | |
android { | |
compileSdkVersion XX | |
buildToolsVersion "XX" |
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
extra.deps { | |
"support" { | |
"appCompat"("com.android.support:appcompat-v7:26.0.2") | |
"design"("com.android.support:design:26.0.2") | |
} | |
"picasso"("com.squareup.picasso:picasso:2.5.2") | |
} |
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
dependencies { | |
compile(deps["support.appCompat"]) | |
compile(deps["support"]["design"]) | |
compile(deps["picasso"]) | |
} |
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
// global definition in root project | |
ext.versions = [ | |
compileSdk: 26, | |
targetSdk: 25, | |
… | |
] | |
ext.deps = [ | |
support: [ | |
appCompat: “com.android.support:appcompat-v7:${versions.supportLibrary}”, | |
design: “com.android.support:design:${versions.supportLibrary}”, |
OlderNewer