- make sure the WebStorm "Textmate bundles support" plugin is enabled
- download the Textmate bundle from https://github.com/andrespagella/JSX-TextMate-Bundle
- replace /Syntaxes/JSX.tmLanguage with this https://github.com/yungsters/sublime/blob/master/tmLanguage/JavaScript%20(JSX).tmLanguage (presumeably better?)
- add the textmate bundle to WebStorm
- make sure the *.jsx extension is handled by "Files supported via Textmate bundles"
- in case of color issues: you need to map your WebStorm scheme to a Textmate scheme. The Textmate color schemes are stored in .WebStorm7\config\plugins\textmate\lib\themes (on windows) and can be pruned to get rid of weird background artifacts
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
js/jquery.stickytableheaders.js | 11 +++++++++-- | |
1 files changed, 9 insertions(+), 2 deletions(-) | |
diff --git a/js/jquery.stickytableheaders.js b/js/jquery.stickytableheaders.js | |
index 281af35..f4fd91e 100644 | |
--- a/js/jquery.stickytableheaders.js | |
+++ b/js/jquery.stickytableheaders.js | |
@@ -87,16 +87,23 @@ | |
}; | |
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 sanitizeFilename (filename){ | |
var blacklist = /[^\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF0-9a-z'\s\-_]/gi; | |
return filename.replace(blacklist, '').trim().substring(0, 200); // 200 should be more than enough, but still safe | |
} |
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
# Executes a Stored Procedure from Powershell and returns the first output DataTable | |
function Exec-Sproc{ | |
param($Conn, $Sproc, $Parameters=@{}) | |
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand | |
$SqlCmd.CommandType = [System.Data.CommandType]::StoredProcedure | |
$SqlCmd.Connection = $Conn | |
$SqlCmd.CommandText = $Sproc | |
foreach($p in $Parameters.Keys){ | |
[Void] $SqlCmd.Parameters.AddWithValue("@$p",$Parameters[$p]) |
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
// mongo array upsert | |
mongo('settings').update({'authorizations._id': {$ne: app._id}}, {$push: {'authorizations': app}}, {safe: true, 'new': true}, function(err, newSettings){ | |
if (err) { | |
return callback(err); | |
} | |
if (!newSettings) { | |
return mongo('settings').update({'authorizations._id': app._id}, {$set: {'authorizations.$': app}}, {safe: true}, callback); | |
} | |
callback(); | |
}); |
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
tell application "System Events" | |
key code 23 using {option down, command down} | |
end tell |
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
#!/bin/sh | |
# find newest webstorm install | |
WS=`find /C/Program\ Files\ \(x86\)/JetBrains/*/bin/webstorm.exe -type f -printf '%T@ %p\n' | sort -r | sed 's/^[^ ]* //' | head -n 1` | |
# open current dir | |
DIR=`pwd` | |
`"$WS" "$DIR"` & |
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
#!/bin/sh | |
RANGE=$1 | |
git log --grep="[A-Z]\+-[0-9]\+" --format=%s $RANGE \ | |
| awk 'match($0, /[A-Z]+-[0-9]+/) {print substr($0, RSTART, RLENGTH)}' \ | |
| sort -t "-" -k1,1 -k2,1n \ | |
| uniq |