http://twitter.com/share?text=<TITLE>&url=<URL>
E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com
http://www.facebook.com/sharer.php?u=&p[title]=
/** | |
* Returns a hash code for a string. | |
* (Compatible to Java's String.hashCode()) | |
* | |
* The hash code for a string object is computed as | |
* s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] | |
* using number arithmetic, where s[i] is the i th character | |
* of the given string, n is the length of the string, | |
* and ^ indicates exponentiation. | |
* (The hash value of the empty string is zero.) |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
<?php | |
$objValidation = $objPHPExcel->getActiveSheet()->getCell("C$curr_row")->getDataValidation(); | |
$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); | |
$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); | |
$objValidation->setAllowBlank(false); | |
$objValidation->setShowInputMessage(true); | |
$objValidation->setShowErrorMessage(true); | |
$objValidation->setShowDropDown(true); | |
$objValidation->setErrorTitle('Input error'); | |
$objValidation->setError('Value is not in list.'); |
# | |
# application entry points | |
# https://www.example.com/ (production) | |
# https://demo.example.com/ (demo/lite production) | |
# https://devel.example.com/ (development) | |
# | |
# static content served by nginx server | |
# http://app-be1.example.net:4xxx/ | |
# http://app-be2.example.net:4xxx/ | |
# |