First render | Props change | State change | Force update | Unmount | |
---|---|---|---|---|---|
getDefaultProps | ✔ | ||||
getInitialState | ✔ | ||||
componentWillMount | ✔ | ||||
componentWillReceiveProps | ✔ | ||||
shouldComponentUpdate | ✔ | ✔ | |||
componentWillUpdate | ✔ | ✔ | ✔ | ||
render | ✔ | ✔ | ✔ | ✔ | |
componentDidMount | ✔ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2007-2008 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
* use this file except in compliance with the License. You may obtain a copy of | |
* the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# example usage: | |
# . join-gopro-clips.sh /f/DCIM/111GOPRO/*574*MP4 | |
# this will generate and execute a ffmpeg command: | |
# /cygdrive/c/ProgramData/chocolatey/bin/ffmpeg -i 'F:\DCIM\111GOPRO\GOPR0574.MP4' -filter_complex '[0:v]scale=-1:720[v0];[v0][0:a]concat=n=1:v=1:a=1[v][a]' -r 18 -pix_fmt yuv420p -map '[v]' -map '[a]' -vcodec libx264 -preset veryslow 'C:\Temp\GOPR0574.MP4' | |
#function join-gopro-clips() { | |
i=0 | |
c=$(which ffmpeg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2011, Daniel Guerrero | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function gcoa() {( | |
UPSTREAM=${1:=origin} | |
IFS=$'\n' | |
for BRANCH in $(git branch -r); do | |
BRANCH=${BRANCH# } | |
[[ "$BRANCH" != $UPSTREAM* ]] && continue | |
BRANCH=${BRANCH#$UPSTREAM/} | |
[ "${BRANCH:0:4}" = 'HEAD' ] && continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function de() { | |
ssh -t -i "$DOCKER_CERT_PATH/id_rsa" -p 22 \ | |
-l $(jq -r '.Driver.SSHUser' "$DOCKER_CERT_PATH/config.json") \ | |
$(jq -r '.Driver.IPAddress' "$DOCKER_CERT_PATH/config.json") \ | |
"docker exec $@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew untap caskroom/cask && brew update && brew cleanup --force -s && rm -rf "$(brew --cache)"' && brew tap caskroom/cask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/umdjs/umd/blob/master/returnExportsGlobal.js | |
# Uses Node, AMD or browser globals to create a module. | |
# If you want something that will work in other stricter CommonJS environments, | |
# or if you need to create a circular dependency, see commonJsStrict.js | |
# Defines a module "returnExports" that depends another module called "b". | |
# Note that the name of the module is implied by the file name. It is best | |
# if the file name and the exported global have matching names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var toType = function(obj) { | |
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() | |
} | |
/** | |
* http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/ | |
* toType({a: 4}); //"object" | |
* toType([1, 2, 3]); //"array" | |
* (function() {console.log(toType(arguments))})(); //arguments | |
* toType(new ReferenceError); //"error" |