This file contains hidden or 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
| const agentView = NSStackView.alloc().init(); | |
| const container = NSView.alloc().initWithFrame(NSMakeRect(0, 0, UI.TOOLBAR_DEFAULT_WIDTH, 400)); | |
| container.identifier = pluginConstant.BAR_CONTAINER; | |
| container.addSubview(agentView); | |
| const viewsDictionary = { container, stack: agentView }; | |
| const horizontalConstraints = NSLayoutConstraint.constraintsWithVisualFormat_options_metrics_views( | |
| 'H:|-0-[stack]-0-|', | |
| 0, | |
| nil, |
This file contains hidden or 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
| JavaScript 9 hrs 11 mins ███████▉░░░░░░░░░░░░░ 38.0% | |
| TypeScript 8 hrs 29 mins ███████▍░░░░░░░░░░░░░ 35.1% | |
| JSON 2 hrs 41 mins ██▎░░░░░░░░░░░░░░░░░░ 11.2% | |
| Other 1 hr 44 mins █▌░░░░░░░░░░░░░░░░░░░ 7.2% | |
| Markdown 34 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.4% |
This file contains hidden or 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(modules) { // webpackBootstrap | |
| /******/ // The module cache | |
| /******/ var installedModules = {}; | |
| /******/ | |
| /******/ // The require function | |
| /******/ function __webpack_require__(moduleId) { | |
| /******/ | |
| /******/ // Check if module is in cache | |
| /******/ if(installedModules[moduleId]) { | |
| /******/ return installedModules[moduleId].exports; |
This file contains hidden or 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
| #!/bin/sh | |
| port=$1 | |
| pid=`lsof -i :${port} -P -t -sTCP:LISTEN` | |
| dir=`lsof -p ${pid} | awk '$4=="cwd" {print $9}'` | |
| cmd=`ps -o command -p ${pid} | sed -n 2p` | |
| echo "${cmd} in ${dir}" |
This file contains hidden or 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
| #!/bin/sh | |
| COLOR_GREEN='\033[0;32m' | |
| echo "${COLOR_GREEN}Remove node_modules." | |
| rm -rf node_modules | |
| echo "${COLOR_GREEN}Remove yarn.lock." | |
| rm -f yarn.lock | |
| if command -v ayarn > /dev/null 2>&1; then | |
| echo "${COLOR_GREEN}Install node_modules use ayarn." |
This file contains hidden or 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
| sudo apt-get update | |
| sudo apt-get install python-virtualenv libxslt1-dev libxml2 | |
| sudo apt-get install python-dev | |
| sudo apt-get install postgresql | |
| sudo apt-get install postgresql-server-dev-9.3 | |
| sudo apt-get install redis-server | |
| sudo -u postgres createuser -s sentry | |
| sudo -u postgres psql -c "alter user sentry with password 'sentry';" |
假设有个 API /articles 返回的结构如下:
articles: article*
article: {
author: user,
likers: user*
primary_collection: collection?
collections: collection*
}
This file contains hidden or 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
| app.directive('ngEnter', function() { | |
| return function(scope, element, attrs) { | |
| element.bind("keydown keypress", function(event) { | |
| if(event.which === 13) { | |
| scope.$apply(function(){ | |
| scope.$eval(attrs.ngEnter); | |
| }); | |
| event.preventDefault(); | |
| } |
NewerOlder