Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| [Unit] | |
| Description=ngrok client | |
| After=network.target | |
| [Service] | |
| ExecStart=/home/pi/ngrok start --all -config /home/pi/.ngrok2/ngrok.yml | |
| Restart=on-abort | |
| [Install] | |
| WantedBy=multi-user.target |
| const findFlatByKey = (choosenKey, choosenValue) => (ogg) => { | |
| let found = false; | |
| const step = (object, prev, currentDepth) => { | |
| currentDepth = currentDepth || 1 | |
| Object.keys(object).forEach((key) => { | |
| const value = object[key] | |
| const isarray = Array.isArray(value) | |
| const type = Object.prototype.toString.call(value) | |
| const isobject = ( |
| stages: | |
| - test | |
| - build | |
| - deploy | |
| # Prepare the variables we will use on different stages | |
| variables: | |
| IMAGE_TAG: $CI_REGISTRY_IMAGE:latest | |
| IMAGE_TAG_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA | |
| SSH_ENTRY: userforvps@yourDigitalOceanVps.com |
| FROM strapi/base:12 | |
| ARG POSTGRES_USER | |
| ARG POSTGRES_PASSWORD | |
| WORKDIR /srv/app | |
| COPY . ./ | |
| COPY ./ci/wait-for-postgres.sh ./ |
| upstream strapi { | |
| server localhost:1337; | |
| ## For Docker containers and load balancing | |
| # server node2:3000 weight=10 max_fails=3 fail_timeout=30s; | |
| # server node3:3000 weight=10 max_fails=3 fail_timeout=30s; | |
| } | |
| server { | |
| listen 80; | |
| server_name strapi.yourdomain.com; | |
| access_log /var/log/nginx/strapi.yourdomain.com.log; |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)I hereby claim:
To claim this, I am signing this object:
| function onElementHeightChange(elm, callback) { | |
| let lastHeight = elm.clientHeight; | |
| let lastScrollY = window.pageYOffset; | |
| let newHeight; | |
| let newScrollY; | |
| (function run(){ | |
| newHeight = elm.clientHeight; | |
| if(lastHeight !== newHeight) { |
| class FrameResizer { | |
| constructor (frameSelector) { | |
| this.frameSelector = frameSelector; | |
| this.iFrame = document.querySelector(this.frameSelector); | |
| this.iFrameOrigin = new URL(this.iFrame.src).origin; | |
| } | |
| _addEvent (element, type, callback) { | |
| return element.addEventListener(type, callback, false); | |
| } |
| const fs = require('fs'); | |
| const vsts = require('vso-node-api'); | |
| const repoId = 'YOUR_REPO_ID'; | |
| const token = 'YOUR_TOKEN'; | |
| const run = async () => { | |
| const writeStream = fs.createWriteStream('./output.zip'); | |
| const authHandler = vsts.getPersonalAccessTokenHandler(token); | |
| const handler = new vsts.WebApi('https://<username>.visualstudio.com/defaultcollection', authHandler); |