Skip to content

Instantly share code, notes, and snippets.

View villadora's full-sized avatar

Wei Gao villadora

  • Ant,Tmall, DP, MS
  • Shanghai,China
View GitHub Profile
@villadora
villadora / Default.sublime-keymap
Created April 23, 2013 08:40
for subliemacspro
[
{ "keys": ["alt+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+o"], "command": "sbp_open_line" },
// Emacs style go to indentation, alt+e can be complicated on Macs
{ "keys": ["alt+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["alt+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["alt+e"], "command": "move_to", "args": {"to": "eol", "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009 Torsten Becker <torsten.becker@gmail.com>
require 'socket'
require 'uri'
@villadora
villadora / jshintrc
Created August 26, 2013 03:24
jshintrc with comments
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 20, // Maximum errors before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
@villadora
villadora / mysql-node-pool.js
Created September 4, 2013 03:06
usage for node-mysql-pool
var pool = mysql.createPool({
host: '127.0.0.1',
port: '3306',
user: 'root',
password: '123456',
database: 'test',
debug: process.env.NODE_ENV == 'debug'
});
  1. write config file make a config.admin.js, config couchAuth for couch login, and registryCouch to couchdb; update =npm= change the registry address;

  2. start redis install redis, run:

    redis-server dev/redis/redis.conf

  3. start elasticsearch install elasticsearch, run:

@villadora
villadora / utm.md
Created October 31, 2013 02:36
utm

utm = Urchin Tracking Module

@villadora
villadora / 0_reuse_code.js
Created December 4, 2013 01:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

compdef

complete

compctl

$adb shell
# change to root
su
# add read/write permission to /system
mount -o remount, rw /system
# copy
cat ApplicationName.apk > /system/app/ApplicationName.apk
# change permission of apk
chmod 644 ApplicationName.apk
# reboot device

Mathematical Creation

How is mathematics made? What sort of brain is it that can compose the propositions and systems of mathematics? How do the mental processes of the geometer or algebraist compare with those of the musician, the poet, the painter, the chess player? In mathematical creation which are the key elements? Intuition? An exquisite sense of space and time? The precision of a calculating machine? A powerful memory? Formidable skill in following complex logical sequences? A supreme capacity for concentration?

The essay below, delivered in the first years of this century as a lecture before the Psychological Society in Paris, is the most celebrated of the attempts to describe what goes on in the mathematician's brain. Its author, Henri Poincaré, cousin of Raymond, the politician, was peculiarly fitted to undertake the task. One of the foremost mathematicians of all time, unrivaled as an analyst and mathematical physicist, Poincaré was known also as a brilliantly lucid expositor of the philosophy