Skip to content

Instantly share code, notes, and snippets.

View sylvainSUPINTERNET's full-sized avatar
🗑️
:(){ :|: & };:

sylvainSUPINTERNET

🗑️
:(){ :|: & };:
View GitHub Profile
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@sylvainSUPINTERNET
sylvainSUPINTERNET / stuns
Created March 20, 2021 22:33 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
<div class="content">
<div *ngIf="displayNotifications">
<app-notifications-list></app-notifications-list>
</div>
<!-- <header class="main-header main-header--details mobile-only">
<a class="main-header__back" (click)='prevPage()'>
<span class="icon-keyboard_arrow_left"></span>
</a>
<h1 class="main-header__title main-header__title--details">{{'CAMERA_SETTING.TITLE' | translate}}</h1>
</header> -->
@sylvainSUPINTERNET
sylvainSUPINTERNET / test_curl.sh
Last active May 6, 2020 14:49
args_parser_shell
#!/bin/bash
# /!\ Make sure docker runs with the right model (model input byte for JPEG / b64) - (model for ROW)
# /!\ the name (resnet50) is defined by the docker runs above, so change it for your tests with the right docker volume name
# time curl -i -X POST http://localhost:8501/v1/models/resnet50:predict -H "Content-Type: application/json" -d @out64_format.json
# default values
TFS_URL="http://localhost:8501/v1/models"
MODEL_NAME="resnet50"
'use strict';
// dependencies
const crypto = require('crypto');
const base64Url = require('base64-url');
// dans un vrai cas d'usage, mettre en variable d'environnement !
const SECRET = "dd8a2c4fbcfbaa9940aeb830ed507f5c852681797eacaf627fc75a8c1bddf25f"; // -> 256-bit key
<select>
<option value="AF">Afghanistan</option>
<option value="AX">Åland Islands</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>

Fytorio

  1. ####Test

directory : ./imports/startup/server/index.js

Using API

@sylvainSUPINTERNET
sylvainSUPINTERNET / promises_ex.js
Created May 16, 2019 09:57
Promises e.g with async await + Promise.all
async run (modelsToSync){
console.log(";;;;;;;;; RUN STARTED ;;;;;;;;; ");
console.log(` > ${modelsToSync}`);
let dataToSync = [];
for (let model in modelsToSync){
let promise = this.sync(model);
dataToSync.push(promise);
}
try {
@sylvainSUPINTERNET
sylvainSUPINTERNET / main.js
Created April 9, 2019 07:55
Async / await example
function display(){
console.log("display called ...")
return new Promise( (resolve, reject) => {
setTimeout(function(){
console.log("display resolved !");
resolve("aurevoir");
}, 2000)
})
@sylvainSUPINTERNET
sylvainSUPINTERNET / db_import.sh
Created March 19, 2019 10:44
Import database from mongoDB dump
#!/bin/sh
path=/Users/christopher/Development/backups/dumps/[Dump_folder]/[Dump_folder/db_name]
for i in $(ls $path/*.bson)
do
echo mongorestore --drop $i --db mpec
mongorestore --drop $i --db mpec
done