This cookbook is similar to Vue cookbook but contains our custom recipes for some specific cases.
For form validation we use Vuelidate
export default Vue.extend({
...
validations: {
import json | |
import xmltodict | |
import decimal, datetime | |
def default_json_transform(obj): | |
if isinstance(obj, decimal.Decimal): | |
return str(obj) | |
if isinstance(obj, (datetime.date, datetime.datetime)): | |
return obj.isoformat() |
FROM golang:1.14-buster | |
RUN go version | |
ENV GOPATH=/ | |
COPY ./ ./ | |
# install psql | |
RUN apt-get update | |
RUN apt-get -y install postgresql-client |
FROM node:10.15.1-slim | |
COPY ./package.json ./yarn.lock /app/ | |
# Install dependencies for node-gyp | |
# https://github.com/nodejs/node-gyp#on-unix | |
RUN buildDeps='g++ make python' \ | |
&& apt-get update \ | |
&& apt-get install -y --no-install-recommends $buildDeps \ | |
&& cd /app \ |
'use strict' | |
const Fs = require('fs') | |
const Path = require('path') | |
const Axios = require('axios') | |
async function downloadImage () { | |
const url = 'https://unsplash.com/photos/AaEQmoufHLk/download?force=true' | |
const path = Path.resolve(__dirname, 'images', 'code1.jpg') |
This cookbook is similar to Vue cookbook but contains our custom recipes for some specific cases.
For form validation we use Vuelidate
export default Vue.extend({
...
validations: {
Some Jenkinsfile examples |
A super simple bash script to check the status of a GitLab CI pipeline.
$ git push
...
$ git pipeline-status
Status of last pipeline for user/project on gitlab/master:
"pending"
...
$ git pipeline-status
Last updated: 2021-02-21, tested with socket.io v3.1.1
This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.
To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.
If you're looking for examples using frameworks, check these links:
// Express | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const path = require('path'); | |
const PORT = 9000; | |
const STATIC = path.resolve(__dirname, 'dist'); | |
const INDEX = path.resolve(STATIC, 'index.html'); |