One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| import request from "supertest"; | |
| import { GET_RESOURCE } from "./queries/resource"; | |
| import startTestServer from "./setup"; | |
| import { Await } from "src/types/global"; | |
| describe("Queries", () => { | |
| let config: Await<ReturnType<typeof startTestServer>>; | |
| beforeAll(async () => { | |
| config = await startTestServer(); |
| #!/bin/bash | |
| # Shell script to backup MySQL database | |
| # Set these variables | |
| MyUSER="" # DB_USERNAME | |
| MyPASS="" # DB_PASSWORD | |
| MyHOST="" # DB_HOSTNAME | |
| # Backup Dest directory | |
| DEST="" # /home/username/backups/DB |
| //@flow | |
| import React, { Component } from 'react' | |
| import type { ElementRef } from 'react' | |
| type Props = { src: string, alt: string } | |
| type State = { source?: string } | |
| export default class LazyImage extends Component<Props, State> { | |
| state = {} |
| #!/bin/sh | |
| # Make sure to: | |
| # 1) Name this file `backup.sh` and place it in /home/ubuntu | |
| # 2) Run sudo apt-get install awscli to install the AWSCLI | |
| # 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
| # 4) Fill in DB host + name | |
| # 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
| # 6) Run chmod +x backup.sh | |
| # 7) Test it out via ./backup.sh |
| import * as React from 'react'; | |
| import { mount } from 'enzyme'; | |
| import sinon from 'sinon'; | |
| function isImageLoaded(img: HTMLImageElement) { | |
| return img.complete && img.naturalHeight > 0; | |
| } | |
| type Props = { | |
| src: string, |
| {"lastUpload":"2019-03-25T05:11:44.124Z","extensionVersion":"v3.2.7"} |
| const a = (cb) => { | |
| cb() | |
| .then((res) => console.log(res)) | |
| .catch(error => { | |
| console.log('Error caught', error.message) | |
| }) | |
| } | |
| const b = async() => { | |
| throw new Error('new error') |
| .vagrant |
| if (req.method === 'OPTIONS') { | |
| console.log('!OPTIONS'); | |
| var headers = {}; | |
| // IE8 does not allow domains to be specified, just the * | |
| // headers["Access-Control-Allow-Origin"] = req.headers.origin; | |
| headers["Access-Control-Allow-Origin"] = "*"; | |
| headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS"; | |
| headers["Access-Control-Allow-Credentials"] = false; | |
| headers["Access-Control-Max-Age"] = '86400'; // 24 hours | |
| headers["Access-Control-Allow-Headers"] = "X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept"; |