This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A solution that works for me is to define the types that my project is using in tsconfig.json leaving out the node typing’s like this: | |
"types": [ | |
"mathjs", | |
"react", | |
"react-native", | |
"react-native-drawer", | |
"react-native-orientation", | |
"react-navigation", | |
"jest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to keep git log and less output on the screen | |
http://serebrov.github.io/html/2014-01-04-git-log-and-less-keep-output.html | |
Just for git commands: | |
git config --global --replace-all core.pager "less -iXFR" | |
For less globally (including git) - add to .bashrc / .zshrc / etc: | |
export LESS=-iXFR | |
The options we set for less are: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
仅为角色分配bucket的action oss:* 仍然无法list bucket中的objects | |
参考https://www.alibabacloud.com/help/zh/doc-detail/31867.htm | |
RAM和STS授权策略(Policy)配置 | |
{ | |
"Version": "1", | |
"Statement": [ | |
{ | |
"Action": [ | |
"oss:GetBucketAcl", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to keep git log and less output on the screen | |
When git uses less as pager the output of commands like git log disappears from the console screen when you exit from less. This is not convenient in many cases so here is how to fix this. | |
Just for git commands: | |
git config --global --replace-all core.pager "less -iXFR" | |
For less globally (including git) - add to .bashrc / .zshrc / etc: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnf install -y ibus-rime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ES6 specification doesn't seem to support the dynamic loading of modules: | |
function renderView(viewName) { | |
const view = require(path.join('./views', viewName)); | |
... | |
} | |
@kruncher dynamic module loads go through System | |
function renderView (viewName) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Absolute-Center { | |
margin: auto; | |
position: absolute; | |
top: 0; left: 0; bottom: 0; right: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*.java"|xargs cat|grep -v ^$|wc -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function test() { | |
// 捕获异常,递归次数过多调试工具会抛出异常。 | |
try{ | |
!function cir(i) | |
{ | |
// 当打开调试工具后,抛出异常,setTimeout执行test无参数,此时i == NaN,("" + i / i).length == 3 | |
// debugger设置断点 | |
( 1 !== ( "" + i / i).length || 0===a ) && function(){}.constructor("debugger")(),cir(++i); | |
} (0) | |
} catch(e) { |