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
[user] | |
name = Alex Korovyansky | |
email = korovyansk@gmail.com | |
[core] | |
excludesfile = /Users/akorovyansky/.gitignore_global | |
editor = subl -n -w | |
[push] | |
default = simple |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
[user] | |
name = Alex Korovyansky | |
email = korovyansk@gmail.com | |
[core] | |
editor = subl -n -w | |
[push] | |
default = simple | |
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
public static Matcher<View> withDrawable(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public void describeTo(Description description) { | |
description.appendText("with drawable from resource id: " + resourceId); | |
} | |
@Override | |
public boolean matchesSafely(View view) { | |
try { |
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
// http://api.openweathermap.org/data/2.5/forecast/daily?q=Moscow&mode=json&units=metric&cnt=2&lang=ru | |
public class Response { | |
public static class Forecast { | |
public static class Temp { | |
@SerializedName("day") | |
public final double day; | |
@SerializedName("night") |
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
# thanks to http://stackoverflow.com/questions/4981126/how-to-amend-several-commits-in-git | |
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "incorrect@email" ]; then | |
GIT_AUTHOR_EMAIL=correct@email; | |
GIT_AUTHOR_NAME="Correct Name"; | |
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL; | |
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all |
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
android.applicationVariants.all { variant -> | |
task ("prepareNewRelicProperties${variant.name.capitalize()}"){ | |
doLast { | |
copy { | |
from variant.buildType.debuggable ? "${project.projectDir}/src/debug/newrelic.properties" : "${project.projectDir}/src/release/newrelic.properties" | |
into "${project.projectDir}" | |
} | |
} | |
} | |
tasks.getByName("prepare${variant.name.capitalize()}Dependencies").dependsOn("prepareNewRelicProperties${variant.name.capitalize()}") |
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
... | |
NewRelic.withApplicationToken(getString(R.string.my_new_relic_application_token).start(this); | |
... |
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
Rename branch: | |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote | |
// To be continued |
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
String.prototype.startsWith=function(str){return this.indexOf(str) == 0;} | |
String.prototype.trim=function(){return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');}; | |
var tag = "devfest14_registration"; | |
var spreadSheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var metaSheetResponses = makeMetaSheet(spreadSheet.getSheetByName("Responses"), 2, 0); | |
var metaRowFlatRange = metaSheetResponses.getMetaRowFlatRange(1); | |
var emailPositionInDataRange = metaRowFlatRange.positionOf("EMAIL^"); | |
var invitationCodePositionInRange = metaRowFlatRange.positionOf("MERGE_INVCODE^"); | |
var invitationCodeStatusPositionInRange = metaRowFlatRange.positionOf("MERGE_INVSTAT"); | |
var responseStatusPositionInRange = metaRowFlatRange.positionOf(":STATUS"); |
OlderNewer