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
normalizeFindAllResponse(store, primaryModelClass, payload, id, requestType) { | |
if (primaryModelClass.modelName === 'location') { // My data model in this case is location. | |
if (payload && payload.hasOwnProperty('meta')) { | |
let meta = payload.meta; | |
//Store / persist or do something your meta data. | |
delete payload.meta; | |
} | |
} | |
return this._super(...arguments); | |
} |
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
//Override is to accomidate couchdb and that it doesn't like like to see a revision or rev | |
//when creating a record. But because our model contains a rev (which is used for updates | |
//or patch request) we need to make sure during a POST request that we cut or remove the rev | |
//property out of the payload. Since Ember-Data sets it to null (record is about to be added) | |
//removing it won't hurt a thing. | |
serialize(snapshot, options) { | |
let data = this._super(...arguments); | |
if (data.data.attributes.rev === null) { | |
delete data.data.attributes.rev; |
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
#!/bin/bash | |
declare -A matrix | |
num_rows=4 | |
num_columns=5 | |
for ((i=1;i<=num_rows;i++)) do | |
for ((j=1;j<=num_columns;j++)) do | |
matrix[$i,$j]=$RANDOM | |
done | |
done |
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
Download 64 bit chrome for debian | |
cd to your Downloads directory | |
May need to sudo this command: | |
dpkg -i google-chrome-stable_current_amd64.deb | |
To finish installing any missing dependencies: | |
apt-get -f 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
# To build: docker build --force-rm=true -t costco/data:0.0.1 . | |
# To run: docker run -d --name tnc_data_container -t costco/data:0.0.1 | |
FROM busybox:latest | |
MAINTAINER Jeffrey Gilbert <[email protected]> | |
RUN mkdir /data | |
VOLUME /data |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="[ember 1.13.0 Component Form]" /> | |
<title>Sample Component Form</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.0/css/foundation.min.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> |
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
//Only for Ubuntu | |
//ENV DEBIAN_FRONTEND noninteractive | |
RUN /* apt-key adv --keyserver URL_HERE --recv-keys KEY_HERE && */ \ | |
/* echo 'deb URL_HERE trusty main' >> /etc/apt/sources.list && */ \ | |
apt-get update && \ | |
apt-get -yq install \ | |
curl \ | |
... | |
apt-get clean && \ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.12.0/ember-template-compiler.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.12.0/ember.debug.js"></script> | |
</head> |
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
# Docker version 1.6.x | |
# | |
# To build: sudo docker build --force-rm=true -t costco/couchdb:latest . | |
# To run: sudo docker run -d -p 5984:5984 -t costco/couchdb:latest | |
# | |
FROM debian:latest | |
MAINTAINER Jeffrey Gilbert | |
ENV DEBIAN_FRONTEND noninteractive |
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
apg -m 9 -x 9 -n 1 -M SNCL |