Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View reintroducing's full-sized avatar

Matt Przybylski reintroducing

View GitHub Profile
@diegoconcha
diegoconcha / redux_egghead_notes.md
Last active January 18, 2022 13:23
Redux Egghead.io Notes

###Redux Egghead Video Notes###

####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree

@andrewbranch
andrewbranch / autoshrink.js
Last active July 31, 2019 22:07
Responds to window resize events. Max font size taken from initial font size (specify with CSS).
(function($) {
function getTextWidth($element) {
var tester = $("<div/>").text($element.text())
.css({ "position": "absolute", "float": "left", "white-space": "nowrap", "visibility": "hidden", "font": $element.css("font"), "text-transform": $element.css("text-transform"), "letter-spacing": $element.css("letter-spacing") })
.appendTo($element.parent()),
width = tester.innerWidth();
tester.remove();
return width;
}
@robbyrussell
robbyrussell / ohmyzsh-dropbox-sync.sh
Created February 8, 2012 15:20
Keep your @ohmyzsh ~/.zshrc in sync via dropbox
# Was asked how I keep my zshrc config sync'd between my computers with Dropbox
# Add a new directory in your Dropbox (or use an existing one)
mkdir -p ~/Dropbox/ohmyzsh
# move existing file to Dropbox
mv ~/.zshrc ~/Dropbox/ohmyzsh/zshrc
# symlink file back to your local directory
ln -s ~/Dropbox/ohmyzsh/zshrc ~/.zshrc