- 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
/* | |
jQuery.reduce - a jQuery plugin for functional programming | |
@author John Hunter | |
created 2010-09-17 | |
use: $.reduce(arr, fnReduce, valueInitial); | |
fnReduce is called with arguments: [valueInitial, value, i, arr] | |
reduce will never be jQuery core - its not prototype :p (http://dev.jquery.com/ticket/1886) | |
*/ | |
(function ($) { |
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
set $ssl off; | |
if ($ssl_protocol != "" ) { | |
set $ssl on; | |
} | |
fastcgi_param HTTPS $ssl; |
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
// npm i gulp event-stream | |
var gulp = require('gulp'); | |
var es = require('event-stream'); | |
gulp.task('test', function(cb) { | |
return es.concat( | |
gulp.src('bootstrap/js/*.js') | |
.pipe(gulp.dest('public/bootstrap')), | |
gulp.src('jquery.cookie/jquery.cookie.js') |
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
img.grayscale.disabled { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
-webkit-filter: grayscale(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
plugins: | |
... | |
- convertDimensions | |
... |
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
# Provide $query as a variable. | |
# The query is the same as you would enter into the search field e.g. "org:johndevs in:name feedreader" | |
query GetFilesQuery($branch: GitObjectID, $query: String!) { | |
search(first: 1, type: REPOSITORY, query: $query) { | |
edges { | |
node { | |
... on Repository { | |
object(expression: "master:", oid: $branch) { | |
... on Tree { |
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
// Kudos to Grumdrig | |
// http://stackoverflow.com/questions/1207008/how-do-i-lock-the-orientation-to-portrait-mode-in-a-iphone-web-application | |
$(document).ready(function () { | |
function reorient(e) { | |
var portrait = (window.orientation % 180 == 0); | |
$("body > div").css("-webkit-transform", !portrait ? "rotate(-90deg)" : ""); | |
} | |
window.onorientationchange = reorient; | |
window.setTimeout(reorient, 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
# ---------------------------------------------------------------------- | |
# Webfont access | |
# ---------------------------------------------------------------------- | |
# allow access from all domains for webfonts | |
# alternatively you could only whitelist | |
# your subdomains like "sub.domain.com" | |
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> | |
<IfModule mod_headers.c> |
OlderNewer