Skip to content

Instantly share code, notes, and snippets.

View jamesjmtaylor's full-sized avatar
🐉

James Taylor jamesjmtaylor

🐉
View GitHub Profile
@jamesjmtaylor
jamesjmtaylor / .zshrc
Last active October 4, 2023 16:26
My current bash profile aliases and shortcuts (WIP)
# Terminal Prompt customization
PROMPT='%F{27}%2~%f > ' # Shows the present working directory in the left prompt, 2 directories deep
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
RPROMPT=\$vcs_info_msg_0_ # Shows the current branch in the right prompt
zstyle ':vcs_info:git:*' formats '%F{226}(%b)%r%f'
zstyle ':vcs_info:*' enable git
@jamesjmtaylor
jamesjmtaylor / activity_nav.xml
Created March 19, 2018 13:04
Broken Activity ConstraintLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
tools:context="com.jamesjmtaylor.weg2015.TabBarActivity">
<ScrollView
android:id="@+id/cardsSetupFragment"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:context=".cardsTab.CardsFragment">
@jamesjmtaylor
jamesjmtaylor / MainActivity.kt
Last active March 5, 2020 07:00
Android Activity for Obtaining BLE Transmission Power
class MainActivity : AppCompatActivity() {
var bluetoothAdapter : BluetoothAdapter? = null
var bluetoothScanner : BluetoothLeScanner? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
rssiTextView = findViewById(R.id.rssiTextView)
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
//: Playground - noun: a place where people can play
import UIKit
struct User: Codable {
var id: String?
var type: String?
var url: String?
var mobileNumber: String?