Skip to content

Instantly share code, notes, and snippets.

View stakes's full-sized avatar
💯

Jay Stakelon stakes

💯
View GitHub Profile
@stakes
stakes / gist:cae1d2c246f7cbdfb5bb44f7c745978a
Created December 28, 2018 23:27
Pause/Resume Animation: Framer X Code Overrides
import { Data, animate, Override, Animatable } from "framer";
const data = Data({
rotation: Animatable(0),
buttonColor: Animatable("#EE45BA"),
buttonScale: Animatable(1)
});
let animation;
export const SecondHandRotate: Override = () => {
@stakes
stakes / gist:438e1a9de509adee4948a923690916ed
Created December 23, 2018 05:24
Loop Animation: Framer X code override
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ rotation: Animatable(0) });
export const SecondHandRotate: Override = () => {
BeginRotateAnimation();
return {
rotation: data.rotation,
originY: 1
};
const data = Data({ left: Animatable(2), color: "#999" });
let isToggleOn = false;
export const Toggle: Override = () => {
return {
left: data.left,
background: data.color,
onTap() {
let leftValue = isToggleOn ? 2 : 28;
animate.easeOut(data.left, leftValue, { duration: 0.25 });
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ scaleValues: [] });
export const Scale: Override = props => {
data.scaleValues.push({ id: props.id, scaleValue: Animatable(1) });
return {
scale: getValueForId(props.id),
onTap() {
let valueToScale = getValueForId(props.id);
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ scale: Animatable(1) });
const pulse = async () => {
await animate(data.scale, 2).finished;
await animate(data.scale, 1).finished;
pulse();
};
//
// FramerFinder.swift
// fridge
//
// Created by Jay Stakelon on 1/1/16.
//
//
import Foundation
@stakes
stakes / uiview-extensions.swift
Last active July 2, 2024 14:55
UIImage from UIView extension
import UIKit
extension UIView {
func createImage() -> UIImage {
let rect: CGRect = self.frame
UIGraphicsBeginImageContext(rect.size)
let context: CGContextRef = UIGraphicsGetCurrentContext()
@stakes
stakes / frameless.coffee
Last active April 14, 2017 21:08
Framer.js module to open prototypes in Frameless
# Add the following line to your project in Framer Studio.
# `frameless = require "frameless"`
frameless = {}
# Directly opens the prototype in Frameless
frameless.open = ->
intent = "frameless://"
url = intent + window.location.host + window.location.pathname + "/"
window.location.replace url
ActiveAdmin.register Collection do
permit_params do
permitted = [
:id,
:abstract,
:publish_date,
:vertical_id,
articles_attributes: [
@stakes
stakes / Gemfile
Last active August 29, 2015 14:05
Social aggregation POC
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.4'
gem 'sass-rails', '~> 4.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass'