echo -e '*1\r\n$4\r\nPING\r\n' | nc redis.host.com 6379
| function useFormik(props) { | |
| // useState to keep the same observable around without recreating it on each render | |
| const [formik] = React.useState(() => | |
| mobx.observable({ | |
| values: props.initialValues || {}, | |
| touched: {} | |
| }) | |
| ) | |
| // just mutate state, this function itself can be considered an action+reducer |
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| # first you need a new empty branch; let's call it `newroot` | |
| git checkout --orphan newroot | |
| git rm -rf . | |
| # then you apply the same steps | |
| git commit --allow-empty -m 'root commit' | |
| git rebase --onto newroot --root master | |
| git branch -d newroot |
| /* eslint-disable prefer-template */ | |
| const path = require('path'); | |
| const aliases = require('./aliases'); | |
| // /////////////////////////////////////////////////////////////// | |
| // ////////////////// PLUGINS //////////////////////////////// | |
| // /////////////////////////////////////////////////////////////// | |
| const commonPlugins = [ |
| async def main(): | |
| coroutine1 = do_some_work(1) | |
| coroutine2 = do_some_work(2) | |
| coroutine3 = do_some_work(4) | |
| tasks = [ | |
| asyncio.ensure_future(coroutine1), | |
| asyncio.ensure_future(coroutine2), | |
| asyncio.ensure_future(coroutine3) | |
| ] |
| #include <v8.h> | |
| #include <node.h> | |
| using namespace v8; | |
| typedef void (*FreeCallback)(Local<Object> object, Local<Function> fn); | |
| class CallbackStuff { | |
| public: |
| <a class="question_link" target="_blank" href="/question/30746665/answer/49332475">会写 Parser、Tokenizer 是什么水平?</a><br/><br/>大多数编译原理书前100页的内容,说明大学听了一半左右的编译原理课,通俗地说,写了这个只能证明你不是个棒槌。<br><br><br>所以其实你更应该关心不会tokenizer和parser是什么水平。 | |
| <span class="answer-date-link-wrap"> | |
| <a class="answer-date-link last_updated meta-item" data-tip="s$t$发布于 2015-05-29" target="_blank" href="/question/30746665/answer/49332475">编辑于 2015-05-29</a> | |
| </span> | |
| <hr/><a class="question_link" target="_blank" href="/question/30703519/answer/49150834">王垠到底对 winter 做了什么?</a><br/><br/>你可以理解为是路边看到一坨**,忍不住想去一脚踩爆它的心态。(虽然我知道这么做无聊而且会沾一脚)<br><br>想了想,可能还有一点觉得他的粉丝很可怜的,想让他们停止吃**的心态吧,虽然我知道"然而没卵用"。<br><br>回到题主的问题,要问做了什么,那就是“他是**,还碰巧被我看到了”,这样的事情,简直无法被饶恕。 | |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.