At the beginning of a session:
- Read this file.
- Read
~/memory/active-projects.md. - Read the last few days of session logs in
~/memory/session-logs/ - Read the relevant project files for the current request.
| const nativePromise = globalThis.Promise | |
| globalThis.Promise = new Proxy(nativePromise, { | |
| construct(...args){ | |
| const promise = Reflect.construct(...args) | |
| const proxy = new Proxy(promise, { | |
| get: function(target, prop) { | |
| const value = Reflect.get(target, prop); | |
| if (prop === "then"){ | |
| proxy.awaited = true |
| export async function userAbortableFetchWithTimeout(url: string, options?: any) { | |
| // We need our own internal abort controller even if the user passed one | |
| const controller = new AbortController(); | |
| const signal = controller.signal; | |
| // Setup timeout | |
| const timeout = setTimeout(() => { | |
| controller.abort(); | |
| }, options.timeout); |
| // Search every field and swap out the resolvers if an `authorize` key is present | |
| export function authorize (schema) { | |
| // We require auth for all mutations | |
| const mutations = (schema._mutationType && Object.keys(schema._mutationType._fields)) || [] | |
| mutations.forEach(mutationName => { | |
| const field = schema._mutationType._fields[mutationName] | |
| invariant(field.authorize, `Mutation: "${mutationName}" must have an "authorize" property. Use "*" for no auth`) | |
| }) |
| import { AWS } from 'infastructure-as-code' | |
| import fs from 'fs' | |
| AWS.region = 'us-east-1' | |
| const ENV = process.env.NODE_ENV || 'development' | |
| const lambdaRole = new AWS.IAM.Role({ | |
| RoleName: `lambda-execution-${env}` | |
| }) |
I hereby claim:
To claim this, I am signing this object:
I love ember. It is awesome. But I recently stopped using ember-cli. Here is why. Be warned this is a pretty raw stream of thought and may not be particularly well reasoned. Maybe some day I'll edit it into a proper blog post.
I get es6 modules. They are awesome and I look forward to using them one day. But right now I find them to be more of the PITA. IF I had a extremely large app I might feel different, but committing to es6 from day one has led to problems for me and my team. "How do I make this existing lib cooperate that needs to tie into ember?", "How do I debug this issue?". With globals this stuff is trivial. Open web inspector. Poke around. With es6+ ember inspector it isn't terrible, but it is not great either :/ This is has been a definite sticking point for people new to ember on our team. Hard to learn ember and battle ES6 weirdness at the same time.
Everyone keeps saying that this is for modifications to ember-cli internals,
| require "spec_helper" | |
| require 'fastimage' | |
| describe "Image Compression" do | |
| Dir[Rails.root.join("app/assets/images/*.{jpg,png,gif}")].each do |file| | |
| context "#{file}" do | |
| it "should be properly dimensioned" do | |
| FastImage.size(file).each do |dim| | |
| dim.should < 2000 # pixels |