This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
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
/****************************************************************************** | |
How to load Javascript modules into postgres | |
******************************************************************************/ | |
CREATE EXTENSION IF NOT EXISTS plv8 | |
/****************************************************************************** | |
First step is download the Javascript module file | |
Example with undescore-min and node-jpath | |
******************************************************************************/ |
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
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
serialize: function(deserialized) { | |
return !!deserialized ? deserialized.toArray() : null; | |
}, | |
deserialize: function(serialized) { | |
return Ember.A(serialized); |
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
// ES7, async/await | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
(async () => { | |
console.log('a'); | |
await sleep(1000); | |
console.log('b'); | |
})() |
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
'use strict'; | |
/* | |
ember-cli's live-reload doesn't work out of the box for our configuration | |
because we run in local dev using www.yapp.dev over SSL. We use nginx to | |
terminate SSL and reverse proxy appropriate requests to ember-cli. | |
A configuration that gets live-reload working is implemented by this | |
addon plus nginx rules. This addon includes a script tag in index.html | |
as defined by the `contentFor` method below. Our standard nginx config |
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
# $AZURE_REPO_URL needs to be set in your projects Variables section | |
# and include both username and password, e.g: https://username:[email protected]:443/site.git | |
# Clone Azure repository | |
git clone $AZURE_REPO_URL ~/azure | |
cd ~/azure | |
# Replace repository contents | |
rsync --archive --delete --exclude ".*" ~/clone/public/ . |
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
Promise = require 'bluebird' | |
defaultPageSize = 20 | |
paginate = (knex) -> (query, paginationOptions, options) -> | |
if query.fetchAll? | |
model = query | |
query = model.query() |
- Put
reporter.js
intests/helpers/reporter.js
- Change
tests/test-helper.js
to look like the attached - Put
test-container-styles.css
invendor/ember-cli-mocha
to override the default - Stop your server and restart (it doesn't watch
vendor/
by default)
// Notes from our previous deploy strategy
Using
ember-cli-deploy
we will deploy our Ember(-cli) app to S3 (and cloudfront), Redis via github and codeship.
Since skill-set's may vary, set's start by breaking this down at a high level: