Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
I will be using the root user, but would suggest creating a new user
| function useWhyDidYouUpdate(name: string, props: any) { | |
| // Get a mutable ref object where we can store props ... | |
| // ... for comparison next time this hook runs. | |
| const previousProps = React.useRef<any>(); | |
| React.useEffect(() => { | |
| if (previousProps.current) { | |
| // Get all keys from previous and current props | |
| const allKeys = Object.keys({ ...previousProps.current, ...props }); | |
| // Use this object to keep track of changed props |
| function get_browser(){ | |
| var ua = navigator.userAgent; | |
| if (ua.search(/Chrome/) > 0) return 'Chrome'; | |
| if (ua.search(/Firefox/) > 0) return 'Firefox'; | |
| if (ua.search(/Opera/) > 0) return 'Opera'; | |
| if (ua.search(/Safari/) > 0) return 'Safari'; | |
| if (ua.search(/MSIE/) > 0) return 'Internet Explorer'; | |
| return 'Не определен'; | |
| } |
| // SASS | |
| .ripple | |
| width: 0 | |
| height: 0 | |
| border-radius: 50% | |
| background: rgba(255, 255, 255, 0.4) | |
| transform: scale(0) | |
| position: absolute | |
| opacity: 1 |
| var menu = [ | |
| ['Main', ['index.thml']], | |
| ['Aboute', ['aboute.thml']], | |
| ['Catalog', [ | |
| ['phone', 'phone.html'], | |
| ['computers', 'computers.html'], | |
| ['WTF', 'WTF.html'] | |
| ] | |
| ], | |
| ['Contact', ['contact.thml']] |
| .class { | |
| min-height: 620px; | |
| background-image: url(); | |
| background-position: center center; | |
| background-repeat: no-repeat; | |
| background-attachment: fixed; | |
| -webkit-background-size: cover; | |
| background-size: cover; | |
| } |
| $.fn.iconHover = function () { | |
| return $(this).hover( | |
| function(){ | |
| $(this).stop().fadeTo("fast", 1) | |
| }, | |
| function(){ | |
| $(this).stop().fadeTo("slow", 0.5) | |
| } | |
| ); | |
| } |
| /* SASS version */ | |
| /* Negative indent */ | |
| .parent | |
| width: 100% | |
| height: 100% | |
| position: absolute | |
| top: 0 | |
| left: 0 | |
| overflow: auto | |
| .block |
| <?php if ( has_post_thumbnail() ) : ?> | |
| <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> | |
| <?php the_post_thumbnail(); ?> | |
| </a> | |
| <?php endif; ?> |