(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| async.waterfall([ | |
| function(callback){ | |
| queries.getStudentByNIM(nim, function(err, std){ | |
| msg = 'You are choosing ' + lecturerChosen + ' STATUS : PENDING' | |
| notifLength = std.notifs.length+1 | |
| callback(std[0]) | |
| }) | |
| }, | |
| function(callback){ | |
| queries.addNotif(nim, msg, notifLength, function(err){ |
| module.exports = { | |
| getAllStudents: function(cb){ | |
| Std.find({}, cb) | |
| }, | |
| getStudentByNIM: function(nim, cb){ | |
| Std.find({nim:nim}, function(err, student){ | |
| cb(null, student[0]) | |
| }) | |
| }, | |
| getStudentByLink: function(link, cb){ |
| #define FCY 8000000UL // FCY = FOSC / 2 | |
| #include "libpic30.h" | |
| #include "stdio.h" | |
| #include "stdlib.h" | |
| #include "p30f2020.h" | |
| #include "xc.h" | |
| #include "config.h" | |
| int main(void){ | |
| U1BRG = 12; // 38400 baudrate |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| # This way you can customize which branches should be skipped when | |
| # prepending commit message. | |
| if [ -z "$BRANCHES_TO_SKIP" ]; then | |
| BRANCHES_TO_SKIP=(master develop test) | |
| fi | |
| BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
| BRANCH_NAME="${BRANCH_NAME##*/}" |
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const app = express(); | |
| app.use(bodyParser.json()); | |
| app.use(bodyParser.urlencoded({ | |
| extended: true, | |
| })); | |
| // assume callback url is: http://localhost:3000/event |
| const data = startTrigger.data; | |
| const statusEmojis = { | |
| // github | |
| "queued": "⌛", | |
| "in_progress": "🏃♂️", | |
| "completed": "🚀", | |
| "failure": "❌", | |
| // heroku |
| name: Deploy to VPS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest |