Skip to content

Instantly share code, notes, and snippets.

View ampatspell's full-sized avatar
🔥
Ember.js & Firebase

Arnis Vuskans ampatspell

🔥
Ember.js & Firebase
View GitHub Profile
let client = {
name: 'The Bain',
support: {
email: 'ampatspell@gmail.com'
}
};
let publish = {
darwin: {
filename: 'Bain-darwin-x64-{version}.zip',
@ampatspell
ampatspell / app-models-collection.js
Last active September 27, 2015 00:55
ember-cli-sofa index64 example
import { Model, prefix, type, attr, hasMany } from 'sofa';
const {
computed
} = Ember;
export default Model.extend({
id: prefix(),
import { ViewCollection } from 'sofa';
export default ViewCollection.extend({
modelName: 'message',
ddoc: 'message',
view: 'all',
dependencies: {
collection: [ 'all' ],
@ampatspell
ampatspell / new_prevnext_mixin.js
Last active August 29, 2015 14:25
Messy @ampatspell/relax prev/next document linking v.s. new one
module.exports = function(env) {
var _ = require('lodash');
var Promise = require('@ampatspell/relax').Promise;
var mixin = function(view, parentKey) {
return function() {
this.method('__prevnext', function(key, cb) {
.style_base(@weight, @size) {
font-family: "Open Sans";
font-weight: @weight;
font-size: @size;
}
.style(@weight, @size, @lh) when (ispixel(@lh)) {
.style_base(@weight, @size);
line-height: @lh;
}
@mobile: ~"only screen and (max-width: 529px)";
@tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)";
@desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)";
@desktop-xl: ~"only screen and (min-width: 1129px)";
@2x: ~"only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)";
@ampatspell
ampatspell / gist:4b5e0e024c0e993153b0
Last active August 29, 2015 14:23
Export DayOne entries to CouchDB
var plist = require('plist');
var path = require('path');
var Promise = require('bluebird');
var glob = Promise.promisify(require('glob'));
var readFile = Promise.promisify(require('fs').readFile);
var Store = require('@ampatspell/sofa').Store;
var base = '/Users/ampatspell/Dropbox/Apps/Day One/Journal.dayone';
var baseEntries = path.join(base, 'entries');
var basePhotos = path.join(base, 'photos');