(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
addClass(el, clas, callback) { | |
if (el) { | |
const contains = el.classList.contains(clas); | |
if (contains) { | |
// dont add the class again | |
} else { | |
el.classList.add(clas); | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I hereby claim:
To claim this, I am signing this object:
class GenericHeightAndWidth extends Component { | |
state = { | |
elementWidth: 0, | |
elementHeight: 0 | |
}; | |
componentDidMount() { | |
const elementWidth = document.getElementById('element_id').clientWidth; // get element width | |
const elementHeight = document.getElementById('element_id').clientWidth; // get element height |
# use to ctrl + a | |
set -g prefix C-a | |
set-option -g history-limit 100000 | |
### COLOUR (Solarized 256) | |
#### COLOUR (Solarized 256) | |
# default statusbar colors | |
#set-option -g status-bg colour235 #base02 | |
#set-option -g status-fg colour136 #yellow |
service: my-service | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: ${opt:stage, 'dev'} | |
environment: | |
REDIS_HOST: | |
"Fn::GetAtt": [ElasticCacheCluster, RedisEndpoint.Address] | |
functions: |
Initially, Monads are the biggest, scariest thing about Functional Programming and especially Haskell. I've used monads for quite some time now, but I didn't have a very good model for what they really are. I read Philip Wadler's paper Monads for functional programming and I still didnt quite see the pattern.
It wasn't until I read the blog post You Could Have Invented Monads! (And Maybe You Already Have.) that I started to see things more clearly.
This is a distillation of those works and most likely an oversimplification in an attempt to make things easier to understand. Nuance can come later. What we need when first learning something is a simple, if inaccurate, model.
This document assumes a beginner's knowledge of pure functional programming and Haskell with some brief encounters of Monads, e.g. [Functors, Applicatives, And
# | |
# Cognito user pool/auth setup | |
# | |
Resources: | |
MyAppUserPool: | |
Type: AWS::Cognito::UserPool | |
Properties: | |
UserPoolName: myapp_user_pool | |
UsernameAttributes: # use email as username/login | |
- 'email' |
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl