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
rm node_modules -force -recurse |
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
import React from 'react' | |
import DocumentTitle from 'react-document-title' | |
const withTitle = (documentTitle, WrappedComponent) => { | |
const hocComponent = ({ ...props }) => ( | |
<DocumentTitle title={`${documentTitle.join(' - ')}`}> | |
<WrappedComponent {...props} /> | |
</DocumentTitle> | |
) |
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
GET /product/default/_search | |
{ | |
"query": { | |
"term": { | |
"is_active": { | |
"value": true | |
} | |
} | |
} | |
} |
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 | |
#lost original file so rewrote for future reference, untested | |
#installs latest 2.8.17 | |
#run as root | |
yum install -y gcc gcc-c++ make | |
wget "http://download.redis.io/releases/redis-2.8.17.tar.gz" | |
tar xvfz redis-2.8.17.tar.gz | |
rm -f redis-2.8.17.tar.gz | |
cd redis-2.8.17 | |
make distclean && make |
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
# The YUM package is too old for use with ruby-sqlite3, use the autoconf package from www.sqlite.org | |
cd /opt | |
wget http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz | |
tar xvzf sqlite-autoconf-3070701.tar.gz | |
ln -s /opt/sqlite-autoconf-3070701 /opt/sqlite3 | |
cd /opt/sqlite3 | |
./configure --prefix=/opt/sqlite3 | |
make | |
make install | |
# Shared library will be installed in /usr/local/lib. |
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
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 | |
https://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode |
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
$ pm2 start npm -- start |
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
const squareDigits = (n) => +n.toString().replace(/(\d)/g, d => d * d); | |
andresito del telegram |
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
import React from 'react' | |
import ErrorPage from 'next/error' | |
export default Component => { | |
return class WithError extends React.Component { | |
static async getInitialProps(ctx) { | |
const props = | |
(Component.getInitialProps | |
? await Component.getInitialProps(ctx) | |
: null) || {} | |
if (props.statusCode && ctx.res) { |
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://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw | |
https://www.youtube.com/channel/UC55-mxUj5Nj3niXFReG44OQ | |
https://www.youtube.com/channel/UCtxCXg-UvSnTKPOzLH4wJaQ | |
https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w | |
https://www.youtube.com/channel/UC52hytXteCKmuOzMViTK8_w | |
https://www.youtube.com/channel/UCLXRGxAzeaLDGaOphqapzmg | |
https://www.youtube.com/channel/UC-QDfvrRIDB6F0bIO4I4HkQ | |
https://www.youtube.com/channel/UCBVCi5JbYmfG3q5MEuoWdOw | |
https://www.youtube.com/channel/UCnUYZLuoy1rq1aVMwx4aTzw | |
https://www.youtube.com/channel/UCTspylBf8iNobZHgwUD4PXA |