(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Couldn't find the text of this for a while...
| // Fonts mixin | |
| font-url(file) | |
| return '../fonts/' + file | |
| webfont(family, file, hack-chrome-windows = false, weight = 'normal') | |
| @font-face | |
| font-family family | |
| src url(font-url(file + '.eot')) | |
| src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'), | |
| url(font-url(file + '.woff')) format('woff'), |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {| export function AnimateMixinFactory(stateName) { | |
| var animateMixin = { | |
| getInitialState() { | |
| return { | |
| [stateName]: {} | |
| } | |
| } | |
| }; |
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);2) get requireAccess func => bindCheckAuth to redux
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| #!/bin/bash | |
| # | |
| # 4633c8a2a16a8e0428d253baafb76bbc18f29562390c84d1c85ba98865531a2b | |
| CRYPTER="base64 -b 78" | |
| HEADER="----BEGIN PGP MESSAGE----" | |
| FOOTER="-----END PGP MESSAGE-----" | |
| do_encryption() { | |
| local plain="$1" |