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
| export interface Worker { | |
| firstName: string; | |
| interest: string; | |
| additionalInterests: string[]; | |
| city: string; | |
| age: number; | |
| lastName: string; | |
| phone: string; | |
| experiences: Experience[]; | |
| entryDate: string; |
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
| git checkout master | |
| git pull origin master | |
| git checkout <branch> | |
| git merge master |
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 express = require("express"); | |
| const bodyParser = require("body-parser"); | |
| const request = require("request"); | |
| const path = require("path"); | |
| const PORT = process.env.PORT || 5000; | |
| const Firebase = require("./lib/firebase.init"); | |
| const expense = require("./lib/expense"); | |
| const user = require('./lib/checkUser'); | |
| const total = require('./lib/total'); | |
| const day = require('./lib/setDay'); |
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 Firebase = require("./firebase.init"); | |
| const checkUser = (UID, res) => { | |
| Firebase.FireDB.ref(UID) | |
| .once("value") | |
| .then(snapshot => { | |
| const user = snapshot.val() || "undefined"; | |
| if (user !== "undefined") { | |
| res.send({ redirect_to_blocks: ["offre"] }); | |
| } else { |
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 Firebase = require("./firebase.init"); | |
| const addExpense = (request, res) => { | |
| const body = request.body; | |
| const UID = body["messenger user id"]; | |
| const ref = Firebase.FireDB.ref(UID); | |
| ref.once("value").then(snapshot => { | |
| const user = snapshot.val() || "undefined"; | |
| if (user !== "undefined") { | |
| const date = new Date(); |
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 Firebase = require("./firebase.init"); | |
| const returnTotal = (UID, res) => { | |
| const date = new Date(); | |
| const month = date.getMonth(); | |
| Firebase.FireDB.ref(UID) | |
| .once("value") | |
| .then(snapshot => { | |
| const user = snapshot.val() || "undefined"; | |
| if (user !== "undefined") { |
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 express = require("express"); | |
| const bodyParser = require("body-parser"); | |
| const request = require("request"); | |
| const path = require("path"); | |
| const PORT = process.env.PORT || 5000; | |
| const Firebase = require("./lib/firebase.init"); | |
| const expense = require("./lib/expense"); | |
| const user = require('./lib/checkUser'); | |
| const total = require('./lib/total'); |
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
| encodeSpaces(text) { | |
| const find = ' '; | |
| const regex = new RegExp(find, 'g'); | |
| return text.replace(regex, '\u00A0'); | |
| }, | |
| sendSMS(from, message, destination) { | |
| return new Promise((resolve, reject) => { | |
| const targetNumber = destination.substring(1); | |
| client.messages |
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
| pissWifeOff(req, res) { | |
| let message = 'My husband is the best'; | |
| for (let i = 0; i < 1001; i++) { | |
| twilio.sendSMS('BEST HUSBAND EVER', message, wifeNumber) | |
| .then( | |
| success => { | |
| if (i === 1000) { | |
| res.send('Congrats, you are a dead man') |
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
| @Component({ | |
| selector: "ym-component", | |
| template: `<div *ngIf="hasForm"></div>`, | |
| changeDetection: ChangeDetectionStrategy.OnPush | |
| }) | |
| export class MyComponent { | |
| form: any; | |
| get hasForm(): boolean { | |
| return this.form != null; | |
| } |