This file contains hidden or 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
| # USAGE: To deploy the ember front-end to a remote gitrepo you need to do the following: | |
| # | |
| # Create a dist-deploy folder and repo in the root of the ember repo - and of course add dist-deploy to .gitignore | |
| # Add the remote repo as a remote with same name a branch you want to use | |
| # Have the ember-deploy.sh in the root of the ember repo | |
| # In terminal run sh ember-deploy.sh BRANCH_NAME 'COMMIT_MESSAGE' replacing the BRANCH_NAME and COMMIT_MESSAGE with your own values of course. | |
| set -e # set errors to terminate script | |
| # check if branch name submitted |
This file contains hidden or 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
| // http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit | |
| // form_submit('/contact/', {name: 'Johnny Bravo'}); | |
| function form_submit(path, params, method) { | |
| method = method || "post"; // Set method to post by default if not specified. | |
| // The rest of this code assumes you are not using a library. | |
| // It can be made less wordy if you use one. | |
| var form = document.createElement("form"); | |
| form.setAttribute("method", method); | |
| form.setAttribute("action", path); |
This file contains hidden or 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": ["tab"], | |
| "command": "expand_abbreviation_by_tab", | |
| // put comma-separated syntax selectors for which | |
| // you want to expandEmmet abbreviations into "operand" key | |
| // instead of SCOPE_SELECTOR. | |
| // Examples: source.js, text.html - source | |
| "context": [ | |
| { |
##Windows users:
- Download wamp: http://www.wampserver.com/en/
- Download and extract cmder mini: https://github.com/cmderdev/cmder/releases/download/v1.1.4.1/cmder_mini.zip
- Update windows environment variable path to point to your php install folder (inside wamp installation dir) (here is how you can do this http://stackoverflow.com/questions/17727436/how-to-properly-set-php-environment-variable-to-run-commands-in-git-bash)
cmder will be refered as console
##Mac Os, Ubuntu and windows users continue here:
- Create a database locally named
homesteadutf8_general_ci
This file contains hidden or 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
| const path = require("path") | |
| const fs = require("fs") | |
| // -- Webpack configuration -- | |
| const config = {} | |
| // Application entry point | |
| config.entry = "./src/server/index.js" |
sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
This file contains hidden or 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
| # In spec_helper.rb | |
| RSpec.configure do |config| | |
| .... | |
| rubocop_output = `rubocop` | |
| print rubocop_output | |
| fail "RuboCop Errors" unless rubocop_output.match(/files inspected, no offenses detected/) | |
| end |
This file contains hidden or 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
| # extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip | |
| # under public domain terms | |
| country_bounding_boxes = { | |
| 'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)), | |
| 'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)), | |
| 'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)), | |
| 'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)), | |
| 'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)), | |
| 'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)), |

