import (
_ "net/http/pprof"
"net/http"
)- OpenShift cluster (one-hour sandbox): https://learn.openshift.com/playgrounds/openshift42/
- Workshop Gitbook: https://ibm-developer.gitbook.io/openshift101
- Workshop GitHub Repo: https://github.com/IBM/openshift101/tree/master/workshop
- Repo for the NodeJS application: https://github.com/IBM/node-s2i-openshift
- Background on containers: https://www.ibm.com/cloud/learn/containers
- Background on Kubernetes: https://www.ibm.com/cloud/learn/kubernetes
- All Kubernetes concepts under 30 minutes: https://www.youtube.com/watch?v=90kZRyPcRZw
- Source-to-Image(S2I) Deep-dive: https://www.youtube.com/watch?v=flI6zx9wH6M
- Slides: https://github.com/dewan-ahmed/openshift101 (Kubernetes with Red Hat OpenShift Workshop --- April 21 2020.pptx)
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
| import { map, delay } from 'rxjs/operators'; | |
| import { TestScheduler } from 'rxjs/testing'; | |
| import { Action } from 'redux'; | |
| import { Epic, ofType, ActionsObservable, StateObservable } from 'redux-observable'; | |
| const scheduler = new TestScheduler((actual, expected) => { | |
| if (JSON.stringify(actual) !== JSON.stringify(expected)) { | |
| throw new Error(`Failing test | |
| actual: ${JSON.stringify(actual, null, 2)} |
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
| let UserContext = React.createContext(); | |
| class App extends React.Component { | |
| state = { | |
| user: null, | |
| setUser: user => { | |
| this.setState({ user }); | |
| } | |
| }; |
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
| package main | |
| var ( | |
| dbhostsip = "10.10.12.2:3306" //IP地址 | |
| dbusername = "aogooc" //用户名 | |
| dbpassword = "123456" //密码 | |
| dbname = "ops" //表名 | |
| dbcharset = "utf8" | |
| ) |
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
| import Foundation | |
| final class Sample: NSObject { | |
| @objc dynamic var name: String = "" | |
| } | |
| class MyObj: NSObject { | |
| @objc dynamic var test: String = "" | |
| } | |
| extension NSObjectProtocol where Self: NSObject { |
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
| Learning How To Learn | |
| Module 1 - What is Learning | |
| Focused/Diffuse Modes Thinking | |
| - Obviously ‘focused’ is when you’re concentrating. Direct approach to solving familiar problems. | |
| - Focused: thoughts move through nicely-paved road of familiar notions (neural pattern looks very tight and directed). | |
| - encompasses rational, sequential, analytical approaches to thinking | |
| - Diffuse: More of a search function neural pattern. Thoughts move widely. More of a broad/big-picture perspective trying to connect ideas from different places. | |
| - We’re always either in focused or diffuse mode of thinking. |
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
| import {Action, ActionCreator, Dispatch} from 'redux'; | |
| import {ThunkAction} from 'redux-thunk'; | |
| // Redux action | |
| const reduxAction: ActionCreator<Action> = (text: string) => { | |
| return { | |
| type: SET_TEXT, | |
| text | |
| }; | |
| }; |
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
| // | |
| // PromiseKitHelper.swift | |
| // TrueID | |
| // | |
| // Created by Kittiphat Srilomsak on 3/21/2560 BE. | |
| // Copyright © 2017 peatiscoding.me all rights reserved. | |
| // | |
| import PromiseKit |
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
| // basic example of executing tasks in parallel | |
| fun main(args: Array<String>) { | |
| val strings = listOf("a", "b", "c") | |
| val printStringTasks = mutableListOf<Callable<Unit>>() | |
| strings.forEach { printStringTasks.add(Callable<Unit>({ | |
| println("starting task: $it") | |
| Thread.sleep(2000) | |
| println("finished task: $it") | |
| }))} |
NewerOlder