Skip to content

Instantly share code, notes, and snippets.

@richardleandro1
richardleandro1 / terminal-prompt-git-branch-zsh.md
Created July 3, 2025 21:40 — forked from reinvanoyen/terminal-prompt-git-branch-zsh.md
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

# > GIT BRANCH TERMINAL
function parse_git_branch() {
local branch
branch=$(git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/\1/p')
[[ -n $branch ]] && echo "[$branch]"
}
# blink on/off
BLINK_ON=$'%{\e[5m%}'
@richardleandro1
richardleandro1 / PlayStationBIOSFilesNAEUJP.md
Created March 23, 2024 03:04 — forked from juanbrujo/PlayStationBIOSFilesNAEUJP.md
Files for PlayStation BIOS Files NA-EU-JP
In Terminal cd to the root folder of the Framework project
Archive for iOS
xcodebuild archive \
-scheme FrameworkName \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath './build/FrameworkName.framework-iphoneos.xcarchive' \
SKIP_INSTALL=NO \
@richardleandro1
richardleandro1 / .vimrc
Created March 21, 2018 10:12
initial configuration vimrc
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Author:
" Moonhead
"
" Version:
" 1.0 - 01/20/2014
" 1.1 - 10/10/2014
"
" Raw_Version:
" http://pastebin.com/u/Moonhead
@richardleandro1
richardleandro1 / include_list_viewpager.xml
Created September 11, 2017 21:16 — forked from iPaulPro/include_list_viewpager.xml
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
class MainActivity extends Activity {
// mEntries in this case is just an ArrayList store
private ArrayList<String> mEntries;
// ...
// Fetch method
private void fetch(RequestQueue requestQueue) {
JsonArrayRequest request = new JsonArrayRequest("http://example.com/feed.json",
new Response.Listener<JSONArray>() {