This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trap in scripts | |
# source: https://unix.stackexchange.com/questions/57940/trap-int-term-exit-really-necessary | |
cleanup() { | |
echo "Cleaning stuff up..." | |
exit | |
} | |
trap cleanup INT TERM | |
echo ' --- press ENTER to close --- ' | |
read var |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Sample using gtk3 */ | |
/* Compiling: gcc `pkg-config --cflags gtk+-3.0` -o main main.c `pkg-config --libs gtk+-3.0`*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <gtk/gtk.h> | |
void on_window_destroy(GtkWidget *widget, gpointer data) | |
{ | |
gtk_main_quit(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p-button label="Add Col" (onClick)="addColumn()"></p-button> | |
<div class="flex"> | |
<div *ngFor="let col of colsHeader; index as j; trackBy: colTrackFunc" | |
[ngClass]="getRowClass()"> | |
<div class="dipm-col-item" *ngIf="j === 0">Nom colonne</div> | |
<div class="dipm-col-item" *ngIf="j > 0"> | |
<button pButton pRipple label="Remove Column" class="p-button-outlined mr-2" (click)="removeColumn(j)"></button> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Browser | |
import Html exposing (..) | |
import Html.Events exposing (onClick) | |
import Task | |
import Time | |
main = | |
Browser.element | |
{ init = init | |
, view = view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a work in progress to support a workshop. | |
module Utils { | |
export namespace Duration { | |
export type DurationTime = number; | |
export type DurationUnit = | |
| "h" | |
| "hours" | |
| "m" | |
| "min" | |
| "mins" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =========== Build =========== | |
FROM node:16.14.2-buster As development | |
WORKDIR /usr/src/app | |
RUN chown -R node:node /usr/src/app | |
USER node:node | |
COPY --chown=node:node package*.json ./ | |
RUN npm ci | |
COPY --chown=node:node . . | |
RUN npm run build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Generator = require('yeoman-generator'); | |
const faker = require('faker'); | |
const uuid = require('uuid'); | |
const chalk = require('chalk'); | |
const id = () => uuid.v4(); | |
const rand = (min, max) => Math.ceil(Math.random() * (max - min)) + min; | |
const params = (type, max) => ({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1# https://oracle.github.io/python-cx_Oracle/samples/tutorial/Python-and-Oracle-Database-Scripting-for-the-Future.html#overview | |
2import cx_Oracle | |
3import db_config | |
4 | |
5 | |
6################################################################################### | |
7# Connect to an oracle database | |
8################################################################################### | |
9con = cx_Oracle.connect(db_config.user, db_config.pw, db_config.dsn) | |
10print("Database version: ", con.version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const echo = m => console.log(m); | |
const rand = (max, min = 0) => Math.ceil(Math.random() * (max - min) + min); | |
const even = x => x % 2 == 0; | |
const rank = (stack) => { | |
const f = (b) => { | |
if(b.length == 0) return; // shouldn't happens | |
if(b.length == 1) { | |
echo(b[0]); | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module IdentificationProcessing | |
open System | |
open Domain | |
open ContractDomain | |
type DataSubjectIdentityResolver = | |
string // the name of the type | |
-> obj // the object instance to look into | |
-> string // the owner identity |
NewerOlder