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
let Module = require('module'); | |
let _require = Module.prototype.require; | |
Module.prototype.require = function() { | |
let currentPath = arguments[0]; | |
try { | |
return _require.apply(this,arguments); | |
} catch (err) { | |
// Any errors from importing such as | |
// (not a js module, path cannot be resolved, unsupported extensions) | |
return currentPath; // fallback to return as a pure string |
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
// Change the center of map with offset value, | |
// useful for some cases such as | |
// a Menu/Sidebar sit on top of the map | |
// a Footer sit on top of the map | |
// This hack covers zoom/pan and tileLoading working correctly to the new center (with offset) point | |
(function(global){ | |
global.Map.prototype._getNewPixelOrigin = function (center, zoom) { |
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
// Force zIndex of Leaflet | |
(function(global){ | |
var MarkerMixin = { | |
_updateZIndex: function (offset) { | |
this._icon.style.zIndex = this.options.forceZIndex ? (this.options.forceZIndex + (this.options.zIndexOffset || 0)) : (this._zIndex + offset); | |
}, | |
setForceZIndex: function(forceZIndex) { | |
this.options.forceZIndex = forceZIndex ? forceZIndex : null; | |
} | |
}; |
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
AddEncoding gzip .gz | |
RewriteEngine on | |
#For all request has header contents Accept-encoding: gzip | |
RewriteCond %{HTTP:Accept-encoding} gzip | |
#For all browser except Konqueror | |
RewriteCond %{HTTP_USER_AGENT} !Konqueror |
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
// Require Hack which get stats from webpack to render assets paths | |
let Module = require('module'); | |
let _require = Module.prototype.require; | |
Module.prototype.require = function() { | |
let currentPath = arguments[0]; | |
// let currentFilename = currentPath.substring(currentPath.lastIndexOf('/')+1,currentPath.length); | |
// let currentFileext = currentPath.substring(currentPath.lastIndexOf('.')+1,currentPath.length); | |
// console.log(currentFilename,currentFileext,currentFileext.length); | |
try { | |
return _require.call(this,arguments[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
import React from 'react'; | |
import { | |
withStyles, | |
Grid, | |
CircularProgress | |
} from 'material-ui'; | |
// const PreloadComponent = props => { | |
// const { classes,size } = props; | |
// return ( |
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
server { | |
listen 80; | |
server_name example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name example.com; | |
ssl_certificate /path/to/server.crt; |
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
float avoidDivideByZero (float value) { | |
float signValue = sign(value); | |
return (1. * abs(sign(value))) / (value + (abs(sign(value)) - 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
git push origin `git subtree split --prefix dist master`:gh-pages --force |
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
git push origin `git subtree split --prefix dist master`:gh-pages --force |
OlderNewer