Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Davo Galavotti davo

🏠
View GitHub Profile
View DeferComponentUpdates.js
function getButton(node, index) {
const btn = node.querySelector(".updates--updateButton--3lvlN");
if (index === 0) {
btn.click();
}
}
function parseUpdates() {
[...document.querySelectorAll(".updates--updateRow--3D3bW")].map(
(node, index) => {
@davo
davo / CopyFigmaPlugins.js
Created Jun 18, 2021
Copy all plugins from you Figma account
View CopyFigmaPlugins.js
copy(
Array.from(document.querySelectorAll('.plugin_tiles--installedPluginsList--1RWHl > .plugin_tiles--installedPluginTile--3npNa a')).map(({innerText, href}) => {
let plugins = []
let plugin_name = innerText
let plugin_link = href
let plugin = {
name: plugin_name,
View spline-gradient.js
global.THREE = require("three");
const canvasSketch = require('canvas-sketch');
const Random = require('canvas-sketch-util/random');
const gradientHeight = 512;
const settings = {
dimensions: [ 2048, gradientHeight * 2 ]
};
@davo
davo / cloudTrailEventNames.list
Created May 12, 2020 — forked from pkazi/cloudTrailEventNames.list
List of values for parameter EventName in AWS Cloudtrail events
View cloudTrailEventNames.list
AbortDocumentVersionUpload
AbortEnvironmentUpdate
AbortMultipartUpload
AbortVaultLock
AcceptAccountMapping
AcceptCertificateTransfer
AcceptDelegate
AcceptDirectConnectGatewayAssociationProposal
AcceptFxPaymentCurrencyTermsAndConditions
AcceptHandshake
@davo
davo / ffmpeg.sh
Created Dec 12, 2019
FFMPEG for Twitter Videos
View ffmpeg.sh
ffmpeg -i input.mov -pix_fmt yuv420p -vcodec libx264 -vf scale=1920:-1 -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -ac 2 -strict experimental -r 30 outpu.mp4
@davo
davo / FrameSpy.tsx
Last active Nov 27, 2019
FrameSpy - Refactor
View FrameSpy.tsx
import * as React from 'react'
import { addPropertyControls, ControlType, FrameProps, Frame } from 'framer'
import reactElementToJSXString from 'react-element-to-jsx-string'
import Highlight, { defaultProps } from 'prism-react-renderer'
import { themes } from './themes'
import Clipboard from 'react-clipboard.js'
// @steveruizok
// Define type of property
@davo
davo / versions.json
Created Oct 25, 2019
TypeScript Version
View versions.json
[
{
'Version number': 0.8,
'Release date': '1 October 2012 (2012-10-01)',
'Significant changes': ''
},
{
'Version number': 0.9,
'Release date': '18 June 2013 (2013-06-18)',
'Significant changes': ''
@davo
davo / Readme.md
Last active Aug 12, 2019
Persisting State on Framer X
View Readme.md

State Management on Framer X with React

Here is a collection of implementation strategies to manage state on Framer X. Feel free to contribute your own strategies and ideas.

Examples marked with a checkmark mean that some examples has been provided on this repo.

State Management on Framer X

Only for Framer X

@davo
davo / .block
Created Aug 6, 2019 — forked from DarienLiang/.block
Transition Between Three Views
View .block
license: mit
@davo
davo / ScratchCard.tsx
Created Aug 1, 2019
ScratchCard for Framer X
View ScratchCard.tsx
// WIP Refactored from https://github.com/aleksik/react-scratchcard/
import * as React from 'react'
import { Frame, addPropertyControls, ControlType } from 'framer'
export function ScratchCard({ width, height, children, image: source, finishPercent }) {
const [loaded, setLoaded] = React.useState(false)
const [context, setContext] = React.useState(false)
const [isDrawing, setIsDrawing] = React.useState(false)
const [lastPoint, updateLastPoint] = React.useState(null)