Skip to content

Instantly share code, notes, and snippets.

View scriptonian's full-sized avatar

I-am Konstantin scriptonian

View GitHub Profile
@scriptonian
scriptonian / bst-shell-es5.js
Last active August 29, 2017 19:12
Binary Search Tree Class Shell
//ES5 version
function TreeNode(keyValue) {
this.keyValue = keyValue;
this.left = null;
this.right = null;
this.toString = function() {
return this.keyValue;
}
}
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
open zsh config : vim ~/.zshrc
At the bottom of the file add : source ~/.bash_profile
This must be done in bash_profile
#if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exits
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
CSS Pseudo Classes
Pseudo-classes select elements that already exist.
Based on current state of UI
:hover - an element is hovered
:enabled - an element is eanabled
:disabled - an element is disabled
:checked - an element is checked
att is an attribute within an element. href, type, data-*, src, lang etc!
E:[att] : element with an attribute selector
E:[att=val] : element with an atttribute selector equal to val
E:[att~=val] : element E whose attribute selector att, has within its value the space separated full word val
E:[att|=val] : element E whose attribute selector att, has a value val or begins with val
git config --global user.email "kofi.addaquay@charter.com"
git config --global user.name "kofi"
//open or create a .bashrc file
vim ~/.bashrc
click I to start editing
add your alias or commands you would like to save
Hit Escape
Then type ':wq'
1.
git log
this allows you to see a history of commits
2.
git log --pretty=oneline
limit output to one line per commit. as oppose to the first one that shows quite a bit of info. like author and date, etc