Skip to content

Instantly share code, notes, and snippets.

http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg
import {Thing as BaseThing} from 'shared/components/Thing'
export const Thing = styled(BaseThing, {
// This app needs Things in upper case
textTransform: 'uppercase'
})
// Usage: node moveConfigs.js ../path/to/project
const editJsonFile = require("edit-json-file");
const fs = require("fs");
const path = require("path");
const folder = process.argv[2];
const getPath = (fileName) => path.join(__dirname, folder, fileName);
const packageFile = getPath("package.json");
import React from 'react'
import { provideState, injectState, softUpdate } from 'freactal'
const wrapParentWithState = provideState({
initialState: () => ({
toggleMe: true
}),
effects: {
toggle: softUpdate(state => ({ toggleMe: !state.toggleMe }))
}
@jake-nz
jake-nz / live_updates.md
Created June 3, 2015 21:20
Snapr FX Live Updates

Live Filter & Sticker Pack Updates

Packs

Pack JSON has some new fields for the live update process:

  • id
  • project-slug
  • size - Human readible size of pack with all assets. Eg. "5mb"
@jake-nz
jake-nz / AnimatedStickers.md
Created June 2, 2015 22:52
Snapr FX Animated stickers Spec

Animated stickers

Number of frames

Number of frames needs to be restricted. If a user was to place a 3-frame and a 4-frame sticker on the same image we would need to render 12 output frames so that both stickers looped fully

Output 1 2 3 4 5 6 7 8 9 10 11 12
@jake-nz
jake-nz / cors_resource.py
Last active August 29, 2015 13:58
Tastypie resource base class that allows for cross domain requests by adding CORS headers. - Handles all responses from the resource even ImmediateHttpResponse exceptions.
from tastypie.resources import Resource
from tastypie.exceptions import ImmediateHttpResponse
from django.http import HttpResponse
class CorsResource(Resource):
""" adds CORS headers for cross-domain requests """
def patch_response(self, response):