FROM node:latest
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app
const sharp = require('sharp'); | |
const fs = require('fs'); | |
sharp('path/to/input/image.jpg') | |
.jpeg({ quality: 80 }) | |
.resize({ width: 800 }) | |
.toBuffer((err, buffer) => { | |
if (err) throw err; | |
if (buffer.length > 100 * 1024) { |
sudo mkdir -p /var/www/inhireapp.com/public_html | |
sudo chown -R $USER:$USER /var/www/inhireapp.com/public | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf' | |
<VirtualHost *:80> |
const mongoose = require("mongoose"); | |
const DB_URL = process.env.MONGO_URI; | |
module.exports = () => { | |
const connect = () => { | |
mongoose.Promise = global.Promise; | |
mongoose.connect( | |
DB_URL, | |
{ | |
keepAlive: true, |
upstream notes{ | |
server 178.37.152.51:3000; | |
} | |
upstream backapi{ | |
server 187.37.152.51:8443; | |
} | |
#limit_req_zone $binary_remote_addr zone=one:50m rate=20r/s; |
static getInitialProps = async function() { | |
const catreq = [ | |
"World", | |
"Country", | |
"Sports", | |
"Health", | |
"EntertaintMent", | |
"Business", |
const puppeteer = require('puppeteer'); | |
var fs = require("fs"); | |
const FORM_SELECTOR='form div>div input'; | |
const SUGGESTION_SELECTOR='form div>div ul>li'; | |
async function run() { | |
const browser = await puppeteer.launch({headless: false}); // default is true | |
const page = await browser.newPage(); |
const puppeteer = require('puppeteer'); | |
var fs = require("fs"); | |
const FORM_SELECTOR='form div>div input'; | |
const SUGGESTION_SELECTOR='form div>div ul>li'; | |
async function run() { | |
const browser = await puppeteer.launch({headless: false}); // default is true | |
const page = await browser.newPage(); |
/* Copyright 2013 Google Inc. | |
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */ | |
package com.example.latlnginterpolation; | |
import android.animation.ObjectAnimator; | |
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.os.Build; |
This gist assumes: