stack diff steps
- Checkout & pull latest master
git checkout master && git pull --rebase origin master
- Cut branch from master
arc branch stacked_feature_1
- Make changes, add commits
" Location for installing plugins | |
call plug#begin('~/.vim/plugged') | |
" Other plugins are specified with user/repo on Github or x.vim on vimscripts | |
" Git integration (status bar and commands like Gblame) | |
Plug 'tpope/vim-fugitive' | |
" Add info to sidebar about git | |
Plug 'airblade/vim-gitgutter' | |
" Add file-management commands like :Delete, :Move, and :Rename | |
Plug 'tpope/vim-eunuch' |
import React from "react"; | |
import { Link } from "react-router-dom"; | |
export function createResource(getPromise) { | |
let cache = {}; | |
let inflight = {}; | |
let errors = {}; | |
function load(key) { | |
inflight[key] = getPromise(key) |
// Node version 10.x AWS Lambda Serverless framework | |
const Sentry = require('@sentry/node'); // sentry version "@sentry/node": "^5.5.0", | |
Sentry.init({ | |
dsn: 'https://[email protected]/1234567', | |
async beforeSend(event) { | |
console.log('\n Caught an exception \n'); | |
return event; | |
}, |
stack diff steps
git checkout master && git pull --rebase origin master
arc branch stacked_feature_1
const {useCallback, useEffect, useReducer, useRef} = require('react'); | |
let effectCapture = null; | |
exports.useReducerWithEmitEffect = function(reducer, initialArg, init) { | |
let updateCounter = useRef(0); | |
let wrappedReducer = useCallback(function(oldWrappedState, action) { | |
effectCapture = []; | |
try { | |
let newState = reducer(oldWrappedState.state, action.action); |
class InjectUrlDataMixin: | |
"""Used for POST on nested router (so it can take infromation from URL instead of repeting in serializer). | |
overrides `get_serializer` | |
(ps.: does not make sense for PUT/PATCH -- as the instance is selected by url-kwargs) | |
""" | |
def get_serializer(self, *args, **kwargs): | |
# standart `get_serializer` logic | |
serializer_class = self.get_serializer_class() | |
kwargs['context'] = self.get_serializer_context() |
Being able to flush promise resolution (or rejection) in tests is really, really handy, and even essential sometimes. Jest has an open issue for this but I'm impatient.
Setting this up in userland is possible but non-trivial - an adventure, even. I'll lay out what I had to do for any future intrepid types. I'll try to explain the reasoning for all of this and have nothing be magical.
The over-all target is to do task scheduling entirely in userland so that the task queue can be synchronously run to exhaustion. This entails faking timers and swapping out the native promise implementation for one that'll use the faked timers. All of this will be assuming you're using Jest, but the general ideas are test library agnostic.
Runtime performance seems near to native, though there's significantly more transpilation to be done - first runs will be much slower. If you're seeing significant slowdowns, something's probabl
(* 2019-06-07: Added nohup and output redirection to fix a bug with "Open Terminal here" feature. | |
Thanks to @fools-mate for bringing the issue to my attention. *) | |
on alfred_script(q) | |
do shell script "cd ~; nohup /Applications/kitty.app/Contents/MacOS/kitty /bin/bash -c \"source ~/.bashrc && " & q & ";/bin/bash\" > /dev/null 2>&1 &" | |
end alfred_script |
To enable TrueColor for Tmux, you must make sure that you have two things:
tmux -V
To use chunkwm, you have to go to considerably more trouble than you will be used to if you are coming from the older (but very nice) kwm version 3. If you are coming from kwm 4, you are probably right at home.
Note: these instructions have now been added to the chunkwm wiki: https://github.com/koekeishiya/chunkwm/wiki/Instructions:-chunkwm-with-(s)khd-on-macOS-High-Sierra
chunkwm is heavily modularised. It consists of a daemon, chunkwm, and a command-line control tool, chunkc. Neither will directly interact with the user: you need to use khd for that. chunkc is used to send commands to chunkwm, which is listening on a socket (and chunkc sends to that socket).