/**
* Copyright 2019
* @author Stephane M. Catala
* @license Apache Version 2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.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
/** | |
* 1.) Make sure you have the `GOOGLE_APPLICATION_CREDENTIALS` environment variable | |
* set to the path of your local service account credentials. | |
* @see https://cloud.google.com/storage/docs/reference/libraries#setting_up_authentication | |
* | |
* 2.) Make sure you have the `SUPABASE_URL` and `SUPABASE_KEY` environment variables set | |
* with the proper values from your Supabase Project API page. | |
* | |
* Install dependancies: `npm install --save node-fetch form-data @google-cloud/storage` | |
*/ |
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
const fs = require("fs"); | |
const elasticsearch = require('elasticsearch'); | |
const oboe = require('oboe'); | |
const geojsonInput = process.argv[2] || 'feature_collection.geojson'; | |
const indexname = process.argv[3] || geojsonInput.split('.')[0] || 'feature_collection'; | |
const geometryFieldName = 'geometry'; | |
const shape_type = process.argv[4] || 'geo_shape'; | |
if (shape_type !== 'geo_point' && shape_type !== 'geo_shape') { |
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
proxy: | |
node: | |
- appname-bs.lndo.site:3000 | |
services: | |
node: | |
type: node | |
# Change as needed | |
build: | |
- "cd /app && yarn install" | |
- "cd /app && yarn dev" |
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
# From your Google Spreadsheet, select the menu item Tools > Script editor. | |
# Copy and paste this code. | |
# Replace uuid with the build_hooks uuid from your Netlify project. | |
function onOpen() { | |
SpreadsheetApp.getUi() | |
.createMenu('Scripts') | |
.addItem('Build', 'build') | |
.addToUi(); | |
} |
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/bash | |
migrate_loop() | |
{ | |
# Better readability with separation. | |
echo "========================"; | |
# Get the output of the drush status. | |
drush_output=$(drush ms "$1" --format string); | |
# Split output string into an array. |
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
# Quickstart for Gatsby starter within Lando environment | |
# | |
# Install Lando v. >RC1. | |
# Place .lando.yml inside some directory and cd there. | |
# `git init . && git remote add origin https://github.com/gatsbyjs/gatsby-starter-default.git && git pull origin master` | |
# (feel free to use any starter repo URL). | |
# `lando start`. | |
# Use `lando` for commands available. | |
name: gatsby |
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
{ | |
"name": "mortenson/example", | |
"minimum-stability": "dev", | |
"authors": [ | |
{ | |
"name": "Samuel Mortenson", | |
"email": "samuel.mortenson@acquia.com" | |
} | |
], | |
"repositories": [ |
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
<?php | |
/** | |
* @file | |
* Default theme implementation to display the basic html structure of a single | |
* Drupal page. | |
* | |
* Variables: | |
* - $css: An array of CSS files for the current page. | |
* - $language: (object) The language the site is being displayed in. |
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/bash | |
# Convert CSVs to GeoJSON, in bulk | |
# Usage: ./csv-to-geojson.sh [URL to list of CSV files] | |
# Outputs geoJSON files to the `output` folder | |
# Install csv2geojson if it's not installed | |
type csv2geojson || npm install -g csv2geojson | |
# Cleanup | |
rm -Rf ./tmp |
NewerOlder