QuickCheck is a language for stating properties of programs.
?FORALL(X, nat(), X*X >= 0)| // How To Use | |
| // var categories = CategoryModule.Category.all(); | |
| // var categoryComposite = new CategoryModule.CategoryComposite('CategoryComposite', categories.categorias, null); | |
| // | |
| // var categoryComposities = categoryComposite.findByName('Bar'); | |
| // | |
| // var originalCategories = categoryComposities.map(function(item) { | |
| // return item.original; | |
| // }); |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
I came across 'bundler/inline' in Bundler pull request 3440, which I'd found from Rails pull request 20429. This now has a little snippet on the What's new page of the Bundler site.
This little example demonstrates how I might use it to create a single file using minitest.
I've just noticed that this script was working for me because I already had minitest installed as a system gem. If I uninstall the gem then the script fails because it can't find minitest. The source code documents an option to install gems if they don't exist (gemfile(true) do) but that doesn't seem to work for me. I see the following error:
Fetching gem metadata from https://rubygems.org/...
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using metaclass 0.0.4
| # Add this snippet to the top of your playbook. | |
| # It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
| # [email protected] | |
| - hosts: all | |
| gather_facts: False | |
| tasks: | |
| - name: install python 2 | |
| raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
| function base64url(source) { | |
| // Encode in classical base64 | |
| encodedSource = CryptoJS.enc.Base64.stringify(source); | |
| // Remove padding equal characters | |
| encodedSource = encodedSource.replace(/=+$/, ''); | |
| // Replace characters according to base64url specifications | |
| encodedSource = encodedSource.replace(/\+/g, '-'); | |
| encodedSource = encodedSource.replace(/\//g, '_'); |
xhost + ${hostname} to allow connections to the macOS host *export HOSTNAME=`hostname`* environment: