Below is a template of GitHub's Workflow Action config file. Workflow is GitHub's CI/CD tool, like CircleCI.
Directory relative to the root of your application - .github/workflows/main.yml.
name: Deploy
on: | function make_wrapper<T extends { [k: string]: any }>(root: T) { | |
| type VHWithoutLastElement<T extends [...args: any]> = T extends [...args: infer P, last: any] ? P : never; | |
| type VHLastElement<T extends [...args: any]> = T extends [...args: any, last: infer LastType] ? LastType : never; | |
| type VHCallbackExtractValue<T extends any> = T extends ((err: any, value: infer ValueType) => void) ? (ValueType extends unknown ? void : ValueType) : never; | |
| type VHPromisifier<T extends (...args: any) => any> = T extends (...args: infer P) => any ? ((...args: VHWithoutLastElement<P>) => Promise<VHCallbackExtractValue<VHLastElement<P>>>) : never; | |
| return <fn_t extends keyof T>(fn: fn_t): VHPromisifier<T[fn_t]> => { | |
| return promisify(root[fn]).bind(root); | |
| }; | |
| } |
| " plugins | |
| let need_to_install_plugins = 0 | |
| if empty(glob('~/.vim/autoload/plug.vim')) | |
| silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
| \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| let need_to_install_plugins = 1 | |
| endif | |
| call plug#begin() | |
| Plug 'tpope/vim-sensible' |
| # HELP jvm_classes_loaded The number of classes that are currently loaded in the JVM | |
| # TYPE jvm_classes_loaded gauge | |
| jvm_classes_loaded 8543.0 | |
| # HELP jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution | |
| # TYPE jvm_classes_loaded_total counter | |
| jvm_classes_loaded_total 8543.0 | |
| # HELP jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution | |
| # TYPE jvm_classes_unloaded_total counter | |
| jvm_classes_unloaded_total 0.0 | |
| # HELP jvm_info JVM version info |
| # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"). | |
| # You may not use this file except in compliance with the License. | |
| # A copy of the License is located at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # or in the "license" file accompanying this file. This file is distributed | |
| # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| #!/usr/bin/python | |
| # | |
| # Copyright 2017 Otto Seiskari | |
| # Licensed under the Apache License, Version 2.0. | |
| # See http://www.apache.org/licenses/LICENSE-2.0 for the full text. | |
| # | |
| # This file is based on | |
| # https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html | |
| # (Copyright 2017 SmartBear Software, Licensed under Apache 2.0) | |
| # |
| next_xid = 1 | |
| active_xids = set() | |
| records = [] | |
| def new_transaction(): | |
| global next_xid | |
| next_xid += 1 | |
| active_xids.add(next_xid) | |
| return Transaction(next_xid) |
| /* | |
| ******************************************************************************** | |
| Golang - Asterisk and Ampersand Cheatsheet | |
| ******************************************************************************** | |
| Also available at: https://play.golang.org/p/lNpnS9j1ma | |
| Allowed: | |
| -------- | |
| p := Person{"Steve", 28} stores the value |
(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.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\