Comparing ES7 and core.async
| ES7 | core.async |
|---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| ES7 | core.async |
|---|---|
async function() {...} |
(fn [] (go ...)) |
await ... |
(<! ...) |
await* or Promise.all(...) |
(doseq [c ...] (<! c)) |
This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).
Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.
Switch to the master branch and make sure you are up to date:
| #!/usr/bin/python2 | |
| from __future__ import print_function | |
| from docopt import docopt | |
| from neovim import attach | |
| from neovim.api import NvimError | |
| import os | |
| import sys | |
| __doc__ = """nvim-command - Run a command in the running neovim session. | |
| Usage: | |
| nvim-command <command>...""" |
It's like creating the front end and back end of a compiler inside Haskell without the need of Template Haskell!
Write your DSL AST as a Free Monad, and then interpret the monad any way you like.
The advantage is that you get to swap out your interpreter, and your main code
| #-------------------------------------------------------------------- | |
| # Hide the console window in visual studio projects | |
| #-------------------------------------------------------------------- | |
| if(MSVC) | |
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") | |
| endif() | |
| #-------------------------------------------------------------------- | |
| # Hide the console window in visual studio projects - Release | |
| #-------------------------------------------------------------------- |
| (defmacro condas-> | |
| "A mixture of cond-> and as-> allowing more flexibility in the test and step forms" | |
| [expr name & clauses] | |
| (assert (even? (count clauses))) | |
| (let [pstep (fn [[test step]] `(if ~test ~step ~name))] | |
| `(let [~name ~expr | |
| ~@(interleave (repeat name) (map pstep (partition 2 clauses)))] | |
| ~name))) |
| #!/bin/bash | |
| # Put the contents of this file in your .bashrc, to | |
| # get a prompt that is automatically a distinct, | |
| # stable color on every host you log into. | |
| # ^O puts terminal back into default text mode for every prompt, | |
| # preventing random glyphs. | |
| resetterm="\[\017\]" |
openssl req -new -newkey rsa:2048 -nodes -keyout server-cert.key -out server-cert-sign-req.csr
# Country Name (2 letter code) [AU]:US
# State or Province Name (full name) [Some-State]:California
# Locality Name (eg, city) []:
# Organization Name (eg, company) [Internet Widgits Pty Ltd]:Flutterby Labs, Inc.
# Organizational Unit Name (eg, section) []:
# Common Name (eg, YOUR name) []:www.dogo.co
| - Check that you inserted "request.POST" as an argument to your form when instantiating the form in your view after the POST. | |
| - Add {{ form.errors }} {{ form.non_field_errors }} to the form or debug your view and print them from the debugger. | |
| - Examine each form field in the debugger: myform['<fieldname>'].value() | |
| - Make sure DEBUG = True so that you'll see any server errors. | |
| - Check your server log. | |
| - If all else fails, step through the is_valid() call. |