import "./formik-demo.css";
import React from "react";
import { render } from "react-dom";
import { Formik, Field } from "formik";
import Yup from "yup";
import classNames from "classnames";
// Input feedback
#!/usr/bin/env bash | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# https://docs.docker.com/compose/install/ |
// Example: | |
function myCallback() { | |
// cool stuff here | |
} | |
// don't invoke the function here with () i.e. myCallback(), just reference the name of it it - myCallback. | |
JavaScript.load("/javascripts/something.js", myCallback); | |
// With callback (that’s the good thing): |
//In case anyone was having the same issue in getting toastr to run with webpack and es6 | |
{ | |
"private": true, | |
// ... | |
"#dependencies": "dependencies are the one shipped to the client", | |
"dependencies": { | |
"babel-polyfill": "^6.7.4", | |
"react": "^15.0.0", | |
// ... | |
"whatwg-fetch": "^0.11.1" | |
}, |
// approach 1: define action object in the component | |
this.props.dispatch({ | |
type : "EDIT_ITEM_ATTRIBUTES", | |
payload : { | |
item : {itemID, itemType}, | |
newAttributes : newValue, | |
} | |
}); | |
// approach 2: use an action creator function |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
In NativeScript, the http
module doesn't currently support making network requests to the local file system. That work is intended to be done by the file reader. It's pretty simple to read a local file and parse its contents as JSON.
This is the TypeScript/Promise version of what Emil Oberg created for the same question on StackOverflow. This module should be reusable for any and all asyncronous local JSON read operations.
import * as fs from 'file-system';
var documents = fs.knownFolders.currentApp();
class FileReader {
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
- A Russian translation of this article can be found here, contributed by Timur Demin.
- A Turkish translation can be found here, contributed by agyild.
- There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
Mocha is a unittest framework for Node. In this document, we explain how you can test your javascript code and also your HTTP servers.
Use npm
to install Mocha:
npm install mocha