(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.
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
const isPromise = obj => Boolean(obj) && typeof obj.then === 'function'; | |
const next = (iter, callback, prev = undefined) => { | |
const item = iter.next(prev); | |
const value = item.value; | |
if (item.done) return callback(prev); | |
if (isPromise(value)) { | |
value.then(val => { |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
service: service-name | |
provider: | |
name: aws | |
runtime: nodejs6.10 | |
functions: | |
myfunc: | |
handler: handler.myfunc |
Installing Google Test on Mac
One bash script to install google test (and mock) on your Mac. I assume you already had install cmake
(if not, use brew - brew install cmake
).
It use brew directories to store gmock and gtest.
#!/usr/bin/env bash
ARG UBUNTU_VERSION=20.04 | |
ARG CUDA_VERSION=11.3.1 | |
ARG CUDA=11.3 | |
ARG CUDNN_VERSION=8 | |
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${UBUNTU_VERSION} | |
LABEL maintainer "http://gzupark.dev" | |
ARG CUDA_VERSION | |
ARG CUDA |