(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.
| #!/bin/bash | |
| echo "changeing from $2 to $4" | |
| a2dismod php$2 | |
| a2enmod php$4 | |
| systemctl restart apache2 | |
| update-alternatives --set php /usr/bin/php$4 | |
| update-alternatives --set php /usr/bin/phar$4 | |
| update-alternatives --set phar.phar /usr/bin/phar.phar$4 |
| #!/bin/bash | |
| add-apt-repository ppa:ondrej/php | |
| apt-get update | |
| apt-get install php$1 | |
| apt-get install php$1-xdebug php$1-cli php$1-common php$1-json php$1-opcache php$1-mysql php$1-mbstring php$1-zip php$1-fpm php$1-intl php$1-simplexml php$1-gd | |
| ///pass desired php version as parameter for example 7.0 , 7.1 |
| # size of directory | |
| du -sh <path> | |
| #tar gz directory | |
| tar -czvf target source |
| #!/bin/bash | |
| FILE_PATH=<env file path> | |
| echo $1 | |
| ESCAPED_REPLACE=$(printf '%s\n' "$2" | sed -e 's/[\/&]/\\&/g') | |
| echo $ESCAPED_REPLACE | |
| sed -i \ | |
| -r "s/^($1=).*/\1$ESCAPED_REPLACE/" $FILE_PATH | |
| grep -q -e "$1=$2" $FILE_PATH || echo $1=$2 >> $FILE_PATH |
| import "regenerator-runtime/runtime"; | |
| import { combineReducers, applyMiddleware, createStore,compose } from 'redux'; | |
| import createSagaMiddleware from 'redux-saga'; | |
| import dynamicMiddlewares from 'redux-dynamic-middlewares'; | |
| import { composeWithDevTools } from 'redux-devtools-extension'; | |
| import { all } from 'redux-saga/effects'; | |
| const defaultConfig = { | |
| reducersToSkipFromClearing: [], |
| BRANCH_POINT="$(git merge-base $(git rev-parse --abbrev-ref HEAD) | |
| $(git describe origin/master))" | |
| changedPackages="$(npx lerna ls -p --since $BRANCH_POINT --include-dependents)" |
| npm version prerelease --preid=next | |
| npm publish --tag=next |
(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.
| // Visual regression | |
| http://responsivenews.co.uk/post/56884056177/wraith | |
| https://www.npmjs.org/package/grunt-photobox | |
| http://cburgmer.github.io/csscritic/ | |
| https://github.com/Huddle/PhantomCSS | |
| http://siteeffect.io/ | |
| // CSS test | |
| http://csste.st/techniques/ |
| var safariDebug = ( navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0 ); | |
| if(safariDebug) | |
| { | |
| PhoneGap.run_command = function() | |
| { | |
| if (!PhoneGap.available || !PhoneGap.queue.ready) | |
| return; |