(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.
| var AWS = require('aws-sdk'); | |
| async function asyncForEach(array, callback) | |
| { | |
| for (let index = 0; index < array.length; index++) { | |
| await callback(array[index], index, array); | |
| } | |
| } | |
| exports.handler = async (event) => |
| let moduleQueries = []; | |
| let moduleTypeDefinitions = []; | |
| let moduleMutations = []; | |
| let moduleResolvers = []; | |
| let files = config.getGlobbedFiles(path.join(__dirname, "**", "*schema.js")); | |
| // Load schema files | |
| files.forEach((file) => { | |
| let moduleSchema = require(path.resolve(file)); |
| { | |
| "red": { | |
| "50": "#ffebee", | |
| "100": "#ffcdd2", | |
| "200": "#ef9a9a", | |
| "300": "#e57373", | |
| "400": "#ef5350", | |
| "500": "#f44336", | |
| "600": "#e53935", | |
| "700": "#d32f2f", |
| #!/bin/bash | |
| export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
| -H "Content-Type: application/x-www-form-urlencoded" \ | |
| -d "username=admin" \ | |
| -d 'password=admin' \ | |
| -d 'grant_type=password' \ | |
| -d 'client_id=admin-cli' | jq -r '.access_token') | |
| curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
| <html> | |
| <body> | |
| <script> | |
| var colors = {"Red":{"50":"#ffebee","100":"#ffcdd2","200":"#ef9a9a","300":"#e57373","400":"#ef5350","500":"#f44336","600":"#e53935","700":"#d32f2f","800":"#c62828","900":"#b71c1c","A100":"#ff8a80","A200":"#ff5252","A400":"#ff1744","A700":"#d50000"},"Pink":{"50":"#fce4ec","100":"#f8bbd0","200":"#f48fb1","300":"#f06292","400":"#ec407a","500":"#e91e63","600":"#d81b60","700":"#c2185b","800":"#ad1457","900":"#880e4f","A100":"#ff80ab","A200":"#ff4081","A400":"#f50057","A700":"#c51162"},"Purple":{"50":"#f3e5f5","100":"#e1bee7","200":"#ce93d8","300":"#ba68c8","400":"#ab47bc","500":"#9c27b0","600":"#8e24aa","700":"#7b1fa2","800":"#6a1b9a","900":"#4a148c","A100":"#ea80fc","A200":"#e040fb","A400":"#d500f9","A700":"#aa00ff"},"Deep Purple":{"50":"#ede7f6","100":"#d1c4e9","200":"#b39ddb","300":"#9575cd","400":"#7e57c2","500":"#673ab7","600":"#5e35b1","700":"#512da8","800":"#4527a0","900":"#311b92","A100":"#b388ff","A200":"#7c4dff","A400":"#651fff","A700":"#6200ea"},"Indigo":{"50":"#e8eaf6 |
| var traverse = function(o, fn) { | |
| for (var i in o) { | |
| fn.apply(this,[i,o[i]]); | |
| if (o[i] !== null && typeof(o[i])=="object") { | |
| traverse(o[i], fn); | |
| } | |
| } | |
| } | |
| // usage |
(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.
| # -------------------------------------------- | |
| # This code is for Twitter Bootstrap 2! | |
| # -------------------------------------------- | |
| # | |
| # The MIT License (MIT) | |
| # Copyright (c) 2012-2015 Dennis Riehle | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights |