Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of Gene Bo

Gene Bo

Gene Bo has asked 11 questions and find answers to 93 problems.

Stats

2.8k
EtPoint
1.0k
Vote count
11
questions
93
answers

About

                          ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★

          ~ best dev quote; Words to code by ~

         If it seems too complicated, it probably is

       

                          ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★ ☆ ★

SO

  • mcve: Minimal, Complete, and Verifiable Example

Handy aliases

Placed in ~/.bashrc

alias a="alias | more"
alias ag="a | grep $1"
alias c=clear
alias h=history
alias t=touch
alias td="touch *"
alias l="ls -al"
alias ll="ls -alt"
alias pd="pushd "
alias vib="vi ~/.bashrc"
alias sob="source ~/.bashrc"

# git
alias hg=hg1
alias gc=gc
alias gs="git status ."
alias gst="git stash save "
alias gsl="git stash list"
alias gstp="git stash pop"
alias gf="git fetch"
alias gb="git branch"
alias gu="git config --get remote.origin.url"
alias g="gs"
alias grh="git reset HEAD "
alias gl="git log"
alias gpl="git pull"
alias gpo="git pull origin"
alias gpoh="gpo HEAD"
alias gps="git push"
alias gph="git push origin HEAD"
alias ga='git add'
alias gd='git diff'
alias gco='git checkout '
alias gcod='gco develop ; git pull origin develop; gpl'
#alias gcod='git checkout develop'
alias gm='git mv'
alias gr='git rm'

# removes local repo branches that have already been merged on server
alias clgb="git branch --merged develop | grep -v \"\* develop\" | xargs -n 1 git branch -d"

# adb
alias ks="adb kill-server"
alias devices="adb devices"
alias adbt="adb shell input text "
alias adbk="adb shell input keyevent"
alias adbkt="adbk 61" #tab
alias adbke="adbk 66" #enter key


function hg1 ()
{
  history | grep $1
}


function gc ()
{
  git commit -m "$*"
}

Checklist for DataBinding with List Adapter:

 * 1. Add <layout> tag to the list item xml to get the Binding class
 * 2. Define instance member in ViewHolder for binding
 * 3. Define constructor that : takes the binding, sets click listener, calls .executePendingBindings()
 * 4. In onCreateViewHolder():
 *      A) instantiate binding via : DataBindingUtil.inflate(..)
 *      B) return ViewHolder using : constructor(binding)
 *
 * 5. Access the binding in onBindViewHolder(); - to set ViewModel and otherwise access the list item layout *

. .