Steps to deploy a Node.js app to Ubuntu Server VM using PM2, NGINX and an SSL from LetsEncrypt
This file contains hidden or 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 data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |
This file contains hidden or 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
| // This attribute exists on the element | |
| [value] | |
| // This attribute has a specific value of 'hello' | |
| [value='hello'] | |
| // This attribute value contains the word 'hello' somewhere in it | |
| [value*='hello'] | |
| // This attribute value contains the word 'hello' in a space-separated list |
This file contains hidden or 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 { css } from 'styled-components' | |
| // Breakpoints | |
| const breakpoints = { | |
| mobileMin: '480px', | |
| mobileMax: '959px', | |
| tabletMin: '960px', | |
| tabletMax: '1199px', | |
| desktopMin: '1200px', |
This file contains hidden or 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
| document.getElementsByTagName('button')[0].onclick = function () { | |
| scrollTo(document.body, 0, 1250); | |
| } | |
| function scrollTo(element, to, duration) { | |
| var start = element.scrollTop, | |
| change = to - start, | |
| currentTime = 0, | |
| increment = 20; | |
This file contains hidden or 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
| /** | |
| * usage: | |
| * <ul> | |
| * <Repeat times="3"> | |
| * <li>item</li> | |
| * </Repeat> | |
| * </ul> | |
| * or | |
| * <ul> | |
| * <Repeat |
This file contains hidden or 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
| # name: simply | |
| # Colors | |
| set cyan (set_color cyan) | |
| set yellow (set_color yellow) | |
| set red (set_color red) | |
| set blue (set_color blue) | |
| set green (set_color green) | |
| set orange (set_color ff8300) | |
| set gray (set_color 666666) |
This file contains hidden or 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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { | |
| "key": "ctrl+shift+a", | |
| "command": "workbench.action.toggleActivityBarVisibility" | |
| }, | |
| { | |
| "key": "ctrl+shift+s", | |
| "command": "workbench.action.toggleStatusbarVisibility" | |
| } |
This file contains hidden or 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 Img from 'gatsby-image' | |
| import { graphql, useStaticQuery } from 'gatsby' | |
| const query = graphql` | |
| query { | |
| images: allFile(filter: { extension: { regex: "/jpeg|jpg|png|gif/" } }) { | |
| edges { | |
| node { | |
| extension |
This file contains hidden or 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
| /* eslint-disable react/display-name */ | |
| /* eslin-disable */ | |
| import React, { useState } from 'react' | |
| import { Mutation } from 'react-apollo' | |
| import { adopt } from 'react-adopt' | |
| import { | |
| Container, | |
| Row, | |
| Col, | |
| Card, |