Skip to content

Instantly share code, notes, and snippets.

View stantronic's full-sized avatar
🧪
Experimenting with Ktor

Stanton stantronic

🧪
Experimenting with Ktor
View GitHub Profile
@stantronic
stantronic / TMUX.md
Last active June 29, 2018 09:08
My Personal Tmux Cheat Sheet

Tmux - The Terminal Multiplexer

Lets you run multiple 'terminals' within your terminal through:

  • Multiple windows - A window takes up the whole space of your terminal, (Think of it like a tab in a browser)

  • Multiple panes - A pane takes up a sub-division of a window

Both panes and windows open in the same directory you're already in

Rx Java to Coroutines Cheat Sheet

Some do's and dont's

Dont Do
Dont call suspend functions on view-models from activities or fragments Do launch coroutines in view-models from viewModelScope
call launch within a suspend function (unless you handle the error within the launch block) Do switch threads using withContext(dispatcher)
Dont call suspend functions on view-models from activities or fragments Do launch coroutines in view-models from viewModelScope
Dont call launch within a suspend function (unless you handle the error within the launch block) Do switch threads using withContext(dispatcher)
@stantronic
stantronic / Hilt_and_Dagger.md
Last active May 27, 2022 10:17
Hilt and Dagger Cheatsheet

Terminology

  • Module - a recipe for how to make a thing
  • Component - a kitchen that "cooks up" things according to the recipes
  • Scope - the lifetime of the things created
  • EntryPoint - a place which has its own kitchen

Annotations

  • @Inject - I can be injected, and things can be injected into me
@stantronic
stantronic / ssh_multiple_accounts_github.md
Last active June 21, 2023 09:57
Set up Mac to ssh to two different Github accounts

Set up Mac to ssh to two different Github accounts

Pre-requisites

  • You have two accounts with github
  • You have git installed on your personal machine (currently comes pre-installed on a Macbook Pro)

Steps

Lets suppose you have two accounts on Github

@stantronic
stantronic / gist:69740af24d71281f2731a871b9c7afe0
Created August 28, 2023 10:34
Privacy Policy - So you call yourself an Android developer?
**Privacy Policy**
Steven stanton built the So you call yourself an Android developer? app as a Free app.
This SERVICE is provided by Steven stanton at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use,
and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy.
The Personal Information that I collect is used for providing and improving the Service.

My ADB Cheatsheet

A list of ADB commands I find helpful in general Android Development

ADB stands for Android Device Bridge - it is a program that runs on the host machine for communicating with both real and virtual android devices.

  • adb start-server - start a connection from development machine to android devices
  • adb kill-server - kill the connection from development machine to android devices
  • adb shell <command> - run a bash command on the device
  • adb shell pm <args> - run a command on the package manager