I hereby claim:
- I am cyk on github.
- I am cyk (https://keybase.io/cyk) on keybase.
- I have a public key whose fingerprint is 00CB 31E6 50DE 8EE8 B228 97EC B892 68C4 DA72 1418
To claim this, I am signing this object:
<?php | |
namespace MyApp\Migrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration; | |
use Doctrine\DBAL\Schema\Schema; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
/** |
<?php | |
/** | |
* Chunk by (combined) Element Length | |
* | |
* Similar to PHP's array_chunk but chunks on combined element length instead of element count. | |
* Takes an input array of elements and chunks by combined string lengths. | |
* | |
* NOTE: Any values that exceed chunk length will be excluded. | |
* |
I hereby claim:
To claim this, I am signing this object:
/** | |
Ember Test Helper: Wait for Change | |
Using the MutationObserver API, this helper will wait for an element's contents | |
to change prior to progressing forward. This is helpful when you are testing | |
interactions involving async components (ex., Google Maps SDK queries). | |
@link https://gist.github.com/cyk/e3828d18b26562091447 | |
```javascript |
/** | |
Ember Data: Dependent Relationships (Ember Data v1.13.x) | |
This package extends Ember Data to support creating relationships | |
where a model's dirty state depends not only on its own attributes | |
but on the dirty state of models in dependent relationships as well. | |
```javascript | |
App.Thing = DS.Model.extend({ | |
name : DS.attr('string'), |
My notes (and rudimentary guide) from a research spike that delved into the Google Vision API, AWS API Gateway and Lambda, prototyping a "serverless" API endpoint that returns sentiments expressed by faces in an image.
Google's been rockin' their cloud offerings hard lately. Among their latest releases is the Cloud Vision API (in beta), a service that analyzes the content of an image; detecting things like words, phrases, objects, faces and their emotions. Let's prototype a "serverless" face sentiments endpoint using only the Vision API, AWS API Gateway and a Lambda function.
A quick note on Cloud Vision API pricing. As of this writing, the free tier for face detection is <1000/mo. This app can easily exceed this limit. To give you an idea of this, so far I've used 1103 face detection operations
// .travis/browserstack.js | |
#!/usr/bin/env node | |
const browserstack = require('browserstack'); | |
let WORKER_ID = 0; | |
let username = process.env.BROWSERSTACK_USER; | |
let password = process.env.BROWSERSTACK_ACCESS_KEY; | |
// The exports from BrowserStack Travis addon we're relying on adds |
import Ember from 'ember'; | |
import EmberTableLegacyComponent from '../../ember-table-legacy/components/ember-table-legacy'; | |
export default EmberTableLegacyComponent.extend({ | |
}); |