taskkill /pid {pid} /fnetstat -ano | findstr :8090| export function isPortrait () { | |
| if (!/ios|iphone|ipad|Macintosh/i.test(window.navigator.userAgent)) { // iphone 只会保留竖屏的宽高 | |
| return window.screen.width < window.screen.height | |
| } | |
| return (window.orientation === 180 || window.orientation === 0) | |
| } |
| sudo dhclient -v |
| git diff --name-only HEAD^ | xargs tar -zcvf update.zip |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| class AutoBindMethod { | |
| constructor () { | |
| Object.getOwnPropertyNames(this.constructor.prototype).forEach(m => { | |
| this[m] = this[m].bind(this) | |
| }) | |
| } | |
| } | |
| class Demo extends AutoBindMethod { | |
| constructor () { |
| yum install redis | |
| systemctl start reids | |
| redis-cli ping |
| brew upgrade | |
| brew install redis | |
| brew services start reids | |
| redis-cli ping // will output 'PONG' |
| import os.path | |
| import contextlib | |
| import hashlib | |
| from flask import Flask | |
| from flask.helpers import safe_join | |
| # Injects an "h" parameter on the URLs of static files that contains a hash of | |
| # the file. This allows the use of aggressive cache settings on static files, | |
| # while ensuring that content changes are reflected immediately due to the | |
| # changed URLs. Hashes are cached in-memory and only checked for updates when |
| div{ | |
| overflow : hidden; | |
| text-overflow: ellipsis; | |
| display: -webkit-box; | |
| -webkit-line-clamp: 3; /*3行高*/ | |
| -webkit-box-orient: vertical; | |
| } |