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 androidx.compose.ui.text.AnnotatedString | |
| import androidx.compose.ui.text.ParagraphStyle | |
| import androidx.compose.ui.text.SpanStyle | |
| import androidx.compose.ui.text.TtsAnnotation | |
| fun AnnotatedString.Builder.appendDecorated( | |
| text: String, | |
| spanStyle: SpanStyle? = null, | |
| paragraphStyle: ParagraphStyle? = null, | |
| textAnnotation: TextAnnotation? = 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
| import android.content.Intent | |
| import androidx.activity.ComponentActivity | |
| import androidx.compose.ui.test.junit4.AndroidComposeTestRule | |
| import androidx.test.ext.junit.rules.ActivityScenarioRule | |
| inline fun <reified A : ComponentActivity> createAndroidComposeRule(intent: Intent): AndroidComposeTestRule<ActivityScenarioRule<A>, A> { | |
| return AndroidComposeTestRule( | |
| activityRule = ActivityScenarioRule<A>(intent), | |
| activityProvider = { scenario -> scenario.getActivity() } | |
| ) |
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/git/git/blob/master/contrib/completion/git-completion.bash | |
| # bash-completion | |
| if [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then | |
| . /opt/local/etc/profile.d/bash_completion.sh | |
| fi | |
| # Git auto-completion | |
| if [ -f ~/.git-completion.bash ]; then | |
| . ~/.git-completion.bash | |
| fi |
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
| // Toggles all files in "Files changed" tab in pull request | |
| // Can be exectued through javascript console | |
| var buttons = document.querySelectorAll('button[aria-label="Toggle diff text"]') | |
| for (var i = 0; i < buttons.length; i++) { | |
| buttons[i].click() | |
| } | |
| // One liner that can be used as a bookmark | |
| javascript:void((function(d){d.querySelectorAll('button[aria-label="Toggle diff text"]').forEach(function(x){x.click()});})(document)); |
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
| # In App class | |
| public void onCreate() { | |
| applicationComponent = initializeAppComponentBuilder().build(); | |
| applicationComponent.inject(this); | |
| } | |
| protected DaggerAppComponent.Builder initializeAppComponentBuilder() { | |
| return DaggerAppComponent.builder() | |
| .applicationModule(new ApplicationModule(this)) | |
| .networkModule(new RealNetworkModule()) |
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
| task wrapper(type: Wrapper) { | |
| gradleVersion = '2.4' | |
| } |
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 getCommitId() { | |
| def output = new ByteArrayOutputStream() | |
| exec { | |
| commandLine 'git', 'rev-parse', '--short', 'HEAD' | |
| standardOutput = output | |
| } | |
| return output.toString() | |
| } |
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
| #!/bin/sh | |
| # save file in .git/hooks/prepare-commit-msg | |
| # chmod +x prepare-commit-msg | |
| BRANCH=$(git symbolic-ref --short HEAD) | |
| TICKET=`echo $BRANCH | grep -o 'MOB-\d\{1,\}'` | |
| status=$? | |
| if [ $status -eq 0 ] ; then | |
| echo "[$TICKET]\n$(cat $1)" > $1 |
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
| alias gst='git status' | |
| alias gd='git diff' | |
| alias gl='git lg' | |
| c_cyan=`tput setaf 6` | |
| c_red=`tput setaf 1` | |
| c_green=`tput setaf 2` | |
| c_light_red="$(tput setab 1)" | |
| c_sgr0=`tput sgr0` |
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
| [alias] | |
| lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
| co = checkout |
NewerOlder