Skip to content

Instantly share code, notes, and snippets.

View embryoconcepts's full-sized avatar

Jen Hamilton embryoconcepts

View GitHub Profile
@embryoconcepts
embryoconcepts / validation.swift
Last active April 18, 2020 18:24
Swift 4 Validation with Substring
@IBOutlet weak var txtPassword: UITextField!
@IBOutlet weak var lblPasswordValidation: UILabel!
var isPasswordValid = true
@objc func textFieldDidChange(_ textField: UITextField) {
let attrStr = NSMutableAttributedString (
string: "Password must be at least 8 characters, and contain at least one upper case letter, one lower case letter, and one number.",
attributes: [
.font: UIFont.init(name: "Roboto", size: 11.0) ?? UIFont.systemFont(ofSize: 11.0),
.foregroundColor: UIColor(hexString: "6A6A6A")
@embryoconcepts
embryoconcepts / config
Created May 19, 2018 02:39
ssh/config
# githubPersonal
Host personal
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_personal
# githubWork
Host work
HostName github.com
User git
@embryoconcepts
embryoconcepts / .gitconfig
Created May 19, 2018 02:36
example .gitconfig file
[user]
[alias]
co = checkout
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
[push]
default = simple
[core]
excludesfile = /Users/{user}/.gitignore_global
[credential]
helper = osxkeychain
alias gnb=newBranch
# FUNCTIONS
newBranch() {
NOW=$(date +"%Y%m%d")
NAME="username"
TYPE=""
BRANCH=""
TICKET=""
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
#
# Executes commands at login pre-zshrc.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# Browser
#
# THEME
# - Powerlevel9k AwesomeFont selection (must call before sourcing)
POWERLEVEL9K_MODE='awesome-fontconfig'
# - Source Prezto
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
alias gnb="git checkout -b $*"
alias gnbf=gitNewBranchFeature
alias gnbt=gitNewBranchTest
alias gnbs=gitNewBranchSupport
# FUNCTIONS
NOW=$(date +"%Y-%m-%d")
NAME="yournamehere"
gitNewBranchFeature() {
{
“save_on_focus_lost”: true
}
# EDITOR
export EDITOR='subl -w'