Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.
- Go to
settings
. - Search for
live templates
. - Under the javascript section you should be able to manage your templates.
# http://guides.rubygems.org/command-reference/#gem-environment | |
--- | |
:backtrace: true | |
:bulk_threshold: 1000 | |
:benchmark: false | |
:sources: | |
- http://ruby.taobao.org/ | |
:update_sources: true | |
:verbose: true | |
gem: --no-document |
var Events = (function() { | |
// Backbone.js 0.9.10 | |
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://backbonejs.org | |
// Create a local reference to array methods. | |
var array = []; |
// @return [float] a random number between min and max | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
// @return [integer] a random int between min and max | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} |
# Install tmux on Centos release 6.5 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/usr/local |
#!/bin/bash | |
# Install build dependencies | |
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
# Get GraphicsMagick source | |
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz | |
tar zxvf GraphicsMagick-1.3.9.tar.gz | |
# Configure and compile |
var Sequelize = require('sequelize') | |
var sequelize = new Sequelize('sequelize_test', 'root') | |
//Note that the model definition does not have "fullName" | |
var User = sequelize.define('User', { | |
email: Sequelize.STRING, | |
firstName: Sequelize.STRING, | |
lastName: Sequelize.STRING, | |
}, | |
{ |
根据Unicode5.0整理如下: | |
1)标准CJK文字 | |
http://www.unicode.org/Public/UNIDATA/Unihan.html | |
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF | |
http://www.unicode.org/charts/PDF/UFF00.pdf | |
3)CJK部首补充:2E80-2EFF | |
http://www.unicode.org/charts/PDF/U2E80.pdf |
| 名称 | Unicode | 符号 | | |
| ---- | ------- | ---- | | |
| 间隔号 | 00B7\U+FF0E | ·\. | | |
| 连接号 | 2013 | – | | |
| 破折号 | 2014 | —— | | |
| 引号 | 2018\2019 | ‘’ | | |
| 引号 | 201C\201D | “” | | |
| 省略号 | 2026 | …… | | |
| 顿号 | 3001 | 、 | | |
| 句号 | 3002 | 。 | |
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CoffeeScript: source.coffee |