Skip to content

Instantly share code, notes, and snippets.

View lukemelia's full-sized avatar
💭
Making Yapp better all the time and likely working on some Ember.js OSS

Luke Melia lukemelia

💭
Making Yapp better all the time and likely working on some Ember.js OSS
View GitHub Profile
import { reads }, macro from 'macro-decorators';
/* Usage:
*
* import { hasEnabledFeature } from 'yapp-ember-kit/macro-decorators';
*
* @reads('yappService.model') yapp;
* @hasEnabledFeature('teleportation') canTeleport;
*/
@lukemelia
lukemelia / store-yapp-api-query-blocking.js
Created June 17, 2019 13:38
Orbit strategy with filter based on whether in cache or not
import {
RequestStrategy,
} from '@orbit/coordinator';
export default {
create() {
return new RequestStrategy({
name: 'store-yapp-api-query-blocking',
source: 'store',
@lukemelia
lukemelia / report_open_experiments_to_yappie_job.rb
Created April 22, 2014 17:11
Reporting active A/B tests to Slack using Split, Sidekiq, Sidetiq
class ReportOpenExperimentsToYappieJob
include Sidekiq::Worker
sidekiq_options :queue => :yappie
include Sidetiq::Schedulable
recurrence { daily.hour_of_day(9) }
def perform
active_experiments = Split::Experiment.all.select{ |exp| exp.winner.nil? }
active_experiments.each do |experiment|
@lukemelia
lukemelia / README.md
Last active May 2, 2018 14:40
Ember Twiddle Demo: Mirage with Ember Twiddle

Ember Twiddle Demo: Mirage with Ember Twiddle

Demo

This is a very trivial example of using mirage with Ember Twiddle.

@lukemelia
lukemelia / work-at-yapp.md
Created March 13, 2018 17:32
Ember, Rails & Mobile at Yapp (Remote)

Ember, Rails & Mobile at Yapp (Remote)

Yapp is hiring a “full-stack” engineer, with key skills Ember.js & Rails. Join our small, talented team and do the best work of your career!

If you are passionate about your craft and want a chance to work remotely with a great team where you can influence the technology, process, product, and culture, read on!

About Yapp

We enable non-developers to create mobile apps for conference, trainings and employee communications. Yapp combines clean design, simple UX, and innovative mobile technology to empower people that may lack technical and design know-how, or just don't have time, to create and publish these apps in minutes.

@lukemelia
lukemelia / controllers.application.js
Last active December 7, 2017 04:24
two-literal-routers
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@lukemelia
lukemelia / uuid.js
Created January 13, 2017 19:19
uuid gen
export function uuid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r, v;
r = Math.random() * 16 | 0;
v = c === 'x' ? r : r & 3 | 8;
return v.toString(16);
});
}
@lukemelia
lukemelia / note.txt
Created April 8, 2015 04:34
When Error: watch EMFILE strikes (OS X)
This requires `brew install jq` which is a command json query.
I got this from @krisselden
@lukemelia
lukemelia / main.js
Created June 3, 2016 03:48
letsencrypt with node and heroku
var LE = require('letsencrypt');
var pem = require('pem');
var RSVP = require('rsvp');
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');
var domains, herokuAppName, duplicate;
if (process.env.YAPP_ENV === 'qa') {
domains = ['heroku.yappqa.us', 'my.yappqa.us', 'api.yappqa.us', 'support.yappqa.us' ];
@lukemelia
lukemelia / circle.yml
Created February 2, 2017 04:35
Circle CI example deploying with ember-cli-deploy
machine:
node:
version: 5
checkout:
post:
- git submodule sync
- git submodule update --init
dependencies: