Skip to content

Instantly share code, notes, and snippets.

@tng-sy
tng-sy / gist:b2992aa44b6836a9a2d4aae53046337f
Created July 28, 2020 07:50
Postman add token on request reponse
try {
const data = pm.response.json();
const token = data.token;
pm.environment.set('token', token);
} catch (onError) {
// Nop.
}
<?php
function debug($oData, $dBreak = true) {
echo '<pre>';
print_r($oData);
echo '</pre>';
// break ?.
if ($dBreak) {
exit();
}
<?php
function debug($oData, $dBreak = true) {
echo '<pre>';
print_r($oData);
echo '</pre>';
// break ?.
if ($dBreak) {
exit();
}
@tng-sy
tng-sy / dockerfile
Created December 11, 2018 08:39
pour karl
FROM php:7.2-apache
# --- Default.
RUN apt-get update && \
apt-get install -y --no-install-recommends git zip
RUN apt-get install -y libpq-dev gnupg
RUN docker-php-ext-install sockets
# -- Installation des drivers pour sql server.
@tng-sy
tng-sy / datejs.js
Last active October 19, 2018 15:55
Date JS
const daysNames = [
'Dimanche',
'Lundi',
'Mardi',
'Mercredi',
'Jeudi',
'Vendredi',
'Samedi'
];
const monthsNames = [