Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright(c) 2015 http://feilong.me | |
| # | |
| # @author: Felinx Lee <[email protected]> | |
| # | |
| from tornado.httpclient import HTTPClient, HTTPRequest | |
| from tornado import escape | |
| import hashlib |
| # frontend | |
| server { | |
| listen 80; | |
| server_name yii2.lo; | |
| server_tokens off; | |
| client_max_body_size 128M; | |
| charset utf-8; | |
| access_log /var/log/nginx/yii2-access.log main buffer=50k; |
| <?php | |
| function getTaobaoURLFromShortURL($shortURL) | |
| { | |
| $contents = file_get_contents($shortURL); | |
| $pattern = '/d="J_Url" value=\'(.+)\'>./'; | |
| preg_match($pattern, $contents, $matches); | |
| return urldecode($matches[1]); | |
| } | |
| function getItemIdFromURL($itemURL) |
Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.
The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.
| var join = require('path').join; | |
| var DEFAULT_CONFIG = { | |
| // spm 源 | |
| "registry": "http://private-spm-url", | |
| // Rename files | |
| // 详见:https://github.com/jeremyruppel/pathmap | |
| "pathmap": null, |
| var AppConstants = require('../constants/AppConstants.js'); | |
| var AppDispatcher = require('../dispatchers/AppDispatcher.js'); | |
| var api = require('../utils/api'); | |
| var ActionTypes = AppConstants.ActionTypes; | |
| module.exports = { | |
| create_customer: function(data){ | |
| api.customer.create(data); | |
| } |
| /** @jsx React.DOM */ | |
| var App = React.createClass({ | |
| getInitialState: function() { | |
| return { | |
| pageSize: 2 | |
| } | |
| } | |
| , render: function() { |
| //============================================================================== | |
| // H&L GulpJS + Node - Front End Asset Management | |
| //============================================================================== | |
| var gulp = require("gulp"), | |
| sass = require('gulp-sass'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| jshint = require('gulp-jshint'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglifyjs'), |
| ■db server | |
| ・mysql | |
| $ sudo yum install mysql55 mysql55-devel mysql55-server mysql55-common mysql55-libs | |
| $ sudo vim /etc/my.cnf | |
| [mysqld] | |
| character-set-server = utf8 | |
| [mysqld_safe] | |
| character-set-server = utf8 | |
| [mysql] | |
| default-character-set = utf8 |