Skip to content

Instantly share code, notes, and snippets.

CHAT APP
*******
TECH
- chat_ws/ node typescript : 3099
- proxy /chat :3099
- auth / token
- mongodb/mongoose
- chat ng module
FONCT
- users (list, selectOne/Many)
-> @> ->>
git rebase
chat
// from sample_id 2383 : get list of siblings parent id (189, 190)
nb_slides 2
material parent id 'll_1'
local_lab_id_for_sample_1 'll_1'
local_lab_id_for_sample_2 'll_2'
@Y2017
Y2017 / oapi.js
Last active February 27, 2018 07:38
// Obvious API - REDUX
// https://hackernoon.com/o-api-an-alternative-to-rest-apis-e9a2ed53b93c
const ACTIONS = {
USERS: {
CART: {
ADD: 'ADD_PRODUCT_TO_CART',
},
SIGN_IN: 'SIGN_IN',
SIGN_OUT: 'SIGN_OUT',
## PREZ : Dynamic Forms Prototyping (step 1)
--------------------------------------------
# object of discussion :
for Biotracking, being able to generate dynamic forms
# difficulties :
Ex : to populate the sample_number dropdown with correct values depending of the path (selection context)
// CACHE
//cached between jobs
// put it inside job or globally
// Locally defined cache overrides globally defined options
// cache per job avec key: "$CI_JOB_NAME"
// per-branch caching : key: "$CI_COMMIT_REF_NAME"
// per-job and per-branch caching: key: "$CI_JOB_NAME/$CI_COMMIT_REF_NAME"
// per-branch and per-stage caching : key: "$CI_JOB_STAGE/$CI_COMMIT_REF_NAME"
ou par build :
cd ~/_APP && mkdir -p pr2017_tests &&
cd ~/_APP/pr2017_tests &&
npm init -f &&
npm install g codeceptjs &&
npm install -g nightmare nightmare-upload &&
codeceptjs init
//Choose webdrive.io
@Y2017
Y2017 / Angular2
Last active December 11, 2016 22:04
Username in header
***********
ORILAB
SHARED SERVICES
- username in header
- ngDestroy eventEmitter.unsubscribe();
private _subscription: Subscription;
ngOnDestroy() {
@Y2017
Y2017 / links.html
Last active December 7, 2016 14:41
@Y2017
Y2017 / ng2_observables.ts
Last active November 18, 2016 22:58
Observables, RxJS
// Observables (= streams) open up a continuous channel of communication in which multiple values of data can be emitted over time.
// a pattern of dealing with data by using array-like operations to parse, modify and maintain data
// The subscribe pattern
// ----------------------
import {Component} from '@angular/core';
import {Observable} from 'rxjs/Observable';
@Component({
@Y2017
Y2017 / TS_01_start.ts
Last active April 29, 2018 03:45
Typescript
// Install the TypeScript transpiler using npm:
$ npm install -g typescript
// Then use tsc to manually compile a TypeScript source file into ES5:
$ tsc test.ts
$ node test.js
// Since TypeScript@1.8.2, tsc has a default rule for --module option: target === 'ES6' ? 'ES6' : 'commonjs' (more details can be found here), so we can simply run:
$ tsc ./a.ts ./b.ts
// For Angular 2 projects there are a number of specific settings that need to be configured in a project's