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
"asdf a asdfsad".replace(/\s+/g, "-"); |
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
// .* does not work because it can not handle multi line | |
var regex = /<body.*?>([\s\S]*)<\/body>/igm; | |
regex.exec(data); | |
data = RegExp.$1; |
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
[ | |
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} }, | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, | |
{ "keys": ["ctrl+alt+j"], "command": "join_lines" }, | |
{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" }, | |
{ "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, | |
{ "keys": ["ctrl+shift+s"], "command": "save_all" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["shift+ctrl+f4"], "command": "close_all" }, |
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
(function($) { // jQuery no conflict container | |
"use strict"; // strict mode on! | |
new function() { // class container | |
// map this to that (to use this in anonymous functions) | |
var that = this; | |
// fires initial Event... |
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> | |
<!-- Save this file in ~\Library\Application Support\Sublime Text 2\Packages\User\whatevername.sublime-snippet --> | |
<content><![CDATA[ | |
<a class="button-lookalike ${1:primary} green" data-iconclass="buttoniconright arrow-right" href="${2:#}">${3:link}</a> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>ts.button</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>*.html</scope> --> | |
</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
_getNormalizedPage: function(page) { | |
if(page < 0) { | |
return this.pages.length + (page % this.pages.length) | |
} | |
return page % this.pages.length; | |
} |
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
{ | |
"cmd": ["my_custom_bat.bat"], | |
"encoding": "cp850", | |
"working_dir": "C:/dev/path-to/batch/", | |
"variants": [ | |
{ | |
"cmd": ["solve_world_hunger"], | |
"name": "Solve World Hunger" // Searchable in command pallette | |
}, |
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
# A sass plugin to calculate colums width based on a 100% width, the colspan and the spacing amount. | |
# | |
# Apply this plugin by passing it to the sass command as a require parameter: | |
# >> sass --require ts_sass_functions.rb | |
# | |
# @copyright triplesense | |
# @author Tom Raithel | |
# @version 1.0 | |
# @package com.vorwerk.corporate | |
# |
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
-webkit-tap-highlight-color:rgba(0,0,0,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
# to add it as alias use: | |
# alias svn_remove='svn status | sed -Ee '\''/^!/!d'\'' -e '\''s/^! *(.*)/"\1"/g'\'' | xargs -L1 svn rm' | |
svn status | sed -Ee '/^!/!d' -e 's/^! *(.*)/"\1"/g' | xargs -L1 svn rm |