Skip to content

Instantly share code, notes, and snippets.

View frague59's full-sized avatar

François GUÉRIN frague59

View GitHub Profile
@frague59
frague59 / html
Created March 17, 2022 07:39
plantuml home page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache, must-revalidate" />
<link rel="icon" href="http://127.0.0.1:8888/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="http://127.0.0.1:8888/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="http://127.0.0.1:8888/plantuml.css" />
@frague59
frague59 / webpack.dev.js
Created October 21, 2021 13:01
Dev settings
/* Dev settings for webpack build */
const merge = require('webpack-merge')
const common = require('./webpack.common')
const path = require('path')
const DEBUG_ANALYZE = true
const config = merge(common, {
mode: 'development',
@frague59
frague59 / webpack.common.js
Created October 21, 2021 12:59
Main settings file
/**
* Common webpack settings for app
* */
const webpack = require('webpack')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin')
const alias = {
jquery: 'jquery/dist/jquery',
@frague59
frague59 / webpack-stats-dev.json
Created September 7, 2021 13:38
Webpack generated stats file
{
"status": "done",
"publicPath": "http://0.0.0.0:8080/",
"chunks": {
"about": [
{
"name": "js/about.js",
"publicPath": "http://0.0.0.0:8080/js/about.js",
"path": "/home/fguerin/Projects/agenda.tourcoing.fr/agenda/src/agenda-front/live/js/about.js"
},
@frague59
frague59 / scratch_33.txt
Created September 7, 2021 13:37
Stack - webpack loader
Traceback (most recent call last):
File "/home/fguerin/Projects/agenda.tourcoing.fr/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/fguerin/Projects/agenda.tourcoing.fr/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 204, in _get_response
response = response.render()
File "/home/fguerin/Projects/agenda.tourcoing.fr/venv/lib/python3.9/site-packages/django/template/response.py", line 105, in render
self.content = self.rendered_content
File "/home/fguerin/Projects/agenda.tourcoing.fr/venv/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content
return template.render(context, self._request)
File "/home/fguerin/Projects/agenda.tourcoing.fr/venv/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
@frague59
frague59 / print-schema.yml
Created February 11, 2021 09:24
Print schema
openapi: 3.0.3
info:
title: print-openapi
version: 0.9.25
description: Print application API with an OpenAPI interface
contact:
name: François GUÉRIN
email: [email protected]
url: https://gitlab.ville.tg/fguerin/print-openapi-client
paths:
@frague59
frague59 / schema.yml
Created February 10, 2021 10:27
Print management applicationschema
openapi: 3.0.3
info:
title: print-openapi
version: 0.9.25
description: Print application API with an OpenAPI interface
contact:
name: François GUÉRIN
email: [email protected]
url: https://gitlab.ville.tg/fguerin/print-openapi-client
paths:
@frague59
frague59 / notifier.py
Created February 10, 2021 09:50
notify job file method
def notify_create_job_file(self, print_job: PrintJobCreate, pdf_file_path: Path) -> PrintJobFileCreate:
with self.get_api_instance(authenticated=True) as api_instance:
print_job_file = PrintJobFileCreateRequest(
print_job=print_job.pk,
title="Cartes d'identité",
attachment=open(pdf_file_path, "rb"), # noqa
)
try:
api_response = api_instance.printflow_api_job_file_add_create(
print_job_file_create_request=print_job_file
@frague59
frague59 / login.vue
Created January 6, 2021 09:44
Login page
<template>
<BCard>
<BCardHeader>
<BCardTitle><b class="fa fa-user"></b>&nbsp;Connexion</BCardTitle>
</BCardHeader>
<BCardBody>
<BForm ref="form" @submit.prevent="userLogin">
<BFormGroup
id="id-username-group"
label="Nom d'utilisateur"
auth: {
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'access',
data: 'access',
maxAge: 60 * 30 // 30 minutes
},
refreshToken: {