Skip to content

Instantly share code, notes, and snippets.

View oliverspryn's full-sized avatar
☀️
Everyday is a great day!

Oliver Spryn oliverspryn

☀️
Everyday is a great day!
View GitHub Profile
@oliverspryn
oliverspryn / bard-prompt.txt
Created April 25, 2023 22:49
A prompt for Google Bard used to build ToDo Bard for Android using Jetpack Compose
I am going to build an native Android app using Kotlin and Jetpack Compose. I already have a new project created in Android Studio but would like your help for the rest. I don't have any screens, just an empty activity with a setContext() function inside of it, ready for Jetpack Compose to take over. My next prompt will explain what the app is for and what I want it to do.
This app should be a todo list app. It should have the following features:
- One screen with a list of all of your tasks.
- That screen should have an empty state saying "No Tasks" when there aren't any tasks stored in the app.
- The screen should have a FAB that allows you to add a new task to that list.
@oliverspryn
oliverspryn / chatgpt-prompt.txt
Last active March 11, 2024 12:01
A prompt for ChatGPT used to build ToDo GPT for Android using Jetpack Compose
I am going to build an native Android app using Kotlin and Jetpack Compose. I already have a new project created in Android Studio but would like your help for the rest. I don't have any screens, just an empty activity with a setContext() function inside of it, ready for Jetpack Compose to take over. My next prompt will explain what the app is for and what I want it to do.
This app should be a todo list app. It should have the following features:
- One screen with a list of all of your tasks.
- That screen should have an empty state saying "No Tasks" when there aren't any tasks stored in the app.
- The screen should have a FAB that allows you to add a new task to that list.
@oliverspryn
oliverspryn / Kotest Unit Test (Describe Spec).kt
Last active September 7, 2022 16:44
A collection of file templates and Live templates for Android Studio
#set( $testName = $NAME )
#set( $uutLength = $testName.length() - 4 )
#set( $uut = $testName.substring(0, $uutLength) )
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME} #end
import io.kotest.core.spec.style.DescribeSpec
class $testName : DescribeSpec({
describe("The $uut") {
val uut: $uut = $uut()
@oliverspryn
oliverspryn / git-upstream.sh
Created February 18, 2022 15:59
Set a Git branch's upstream with a single command
git checkout origin branch_that_is_already_on_origin
git upstream
# To use, add this to your ~/.gitconfig file
[alias]
upstream = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
@oliverspryn
oliverspryn / git-new-delete.sh
Created February 18, 2022 15:57
Two Git aliases for creating and deleting branches
git new my_branch
git del my_branch
# To use, add this to your ~/.gitconfig file
[alias]
del = branch -D
new = checkout -b
@oliverspryn
oliverspryn / git-checkout.sh
Created February 18, 2022 15:55
Git alias for checkout
git co my_branch
# To use, add this to your ~/.gitconfig file
[alias]
co = checkout
@oliverspryn
oliverspryn / git-commit-status.sh
Last active February 18, 2022 15:56
Two Git aliases in action showing the commit and status shortcuts
git c "Added a new file"
git s
# To use, add this to your ~/.gitconfig file
[alias]
c = !git add -A && git commit -m
s = status
@oliverspryn
oliverspryn / bash-git-tab-completion.sh
Created February 18, 2022 15:42
Adds support for tab completion in Bash
# Download the scripts
cd ~
curl -o .git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
# ...
# Create or edit your .bashrc file and add this somewhere inside of it:
source ~/.git-completion.bash
@oliverspryn
oliverspryn / .zshrc
Created February 18, 2022 15:37
Configures the shell to utilize a preinstalled Git completion script
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
@oliverspryn
oliverspryn / build.gradle
Created February 11, 2022 16:29
Gradle managed devices
android {
testOptions {
devices {
pixel2api29 (com.android.build.api.dsl.ManagedVirtualDevice) {
device = "Pixel 2"
apiLevel = 29
systemImageSource = "google"
abi = "x86"
}