This file contains 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
{ | |
"config": { | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "upper", | |
"block-indent": " ", | |
"color-shorthand": false, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": false, |
This file contains 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
var getPointerEvent = function(event) { | |
return event.originalEvent.targetTouches ? event.originalEvent.targetTouches[0] : event; | |
}; | |
var $touchArea = $('#touchArea'), | |
touchStarted = false, // detect if a touch event is sarted | |
currX = 0, | |
currY = 0, | |
cachedX = 0, | |
cachedY = 0; |
This file contains 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
<snippet> | |
<content><![CDATA[{% blocktrans %}$SELECTION$1{% endblocktrans %}]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>trans</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<scope>source.html</scope> | |
<!-- Optional: Description to show in the menu --> | |
<description>Trans snippet</description> | |
</snippet> |
This file contains 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
<snippet> | |
<content><![CDATA[{% trans '$SELECTION$1' %}]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>trans</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<scope>source.html</scope> | |
<!-- Optional: Description to show in the menu --> | |
<description>Trans snippet</description> | |
</snippet> |
This file contains 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
Show hidden characters
[ | |
{ | |
"keys" : ["ctrl+shift+t"], | |
"command" : "insert_snippet", | |
"args" : { | |
"name": "Packages/User/trans.sublime-snippet" | |
} | |
}, | |
{ | |
"keys" : ["ctrl+alt+shift+t"], |
This file contains 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
//less mixin | |
.size(@string) { | |
@w: ~`(function(a){ return a.split(" x ").shift()+"px"; })( @{string})`; | |
@h: ~`(function(a){ return a.split(" x ").pop()+"px"; })( @{string})`; | |
width:@w; | |
height:@h; | |
} | |
//usage | |
#myId{ |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |