Skip to content

Instantly share code, notes, and snippets.

View davo's full-sized avatar
🏠

Davo Galavotti davo

🏠
View GitHub Profile
import * as React from 'react'
import { Frame, PropertyControls, ControlType } from 'framer'
interface Props {
color: string
}
export class componentName extends React.Component<Props> {
static defaultProps = {
width: 1600,
@davo
davo / open-safari-tabs-in-chrome.scpt
Created August 12, 2018 17:34 — forked from paulirish/open-chrome-tabs-in-safari.scpt
Open Safari tabs in Google Chrome
tell application "Safari"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Google Chrome" to open location the_url
end repeat
end tell
@davo
davo / gsap-properties-cheat-sheet.md
Created April 12, 2018 21:35 — forked from lunelson/gsap-properties-cheat-sheet.md
Greensock Properties Cheat Sheet

Greensock CSS properties Cheat Sheet

I wrote this as a reference for myself because some of the property names are non-obvious, and there are a number of relevant special properties, and there is no central concise listing of them all in GSAP Docs, other than (in longer form) on the CSSPlugin page.

Standard CSS properties

...are all supported, with hyphenated-names becoming camelCaseNames. Non-animatable properties are also supported but they will be set at the beginning of the tween.

Special mentions:

@davo
davo / README.md
Last active April 1, 2018 18:13 — forked from curran/.block
Color and Texture with textures.js

A test of textures.js that shows one approach for having independent scales for color and texture.

This ended up being more code than expected, because each (color, texture) combination needs to be defined independently. This is because each texture ends up as an SVG def, whose color properties (fill, stroke) cannot be changed per mark. Each (color, texture) pair must exist globally, then be applied to each mark.

@davo
davo / Layer.createChildrenRefs.coffee
Last active March 5, 2018 20:19 — forked from isaacw/Layer.createChildrenRefs.coffee
Creates convenience refs on targeted layers from the design tab so that we don't have to use Layer::childrenWithName.
# Layer::createChildrenRefs
# Creates convenience refs on targetd layers from the design tab so that we don't have to use Layer::childrenWithName.
# Pass recursive=true to do this for all descendant layers while maintaining hierarchy.
Layer::createChildrenRefs = (recursive=false, camelCase=true, ignoreLayers=true) ->
for layer in @children
# Filter any layer with a name starting with '_' as 'private layers'.
unless ignoreLayers is false
if _.startsWith(layer.name, '_')
return true
@davo
davo / .block
Last active December 12, 2017 21:44 — forked from jstcki/README.md
d3.grid - d3.js v4(wip)
license: mit
## Domain Specific Languages in Coffee Script
# ## Title
# ## What's Domain Specific Languages
# ## Great Examples in Coffee Script:
#### Socket.io
@davo
davo / quick.coffee.md
Created August 29, 2017 05:30 — forked from joyrexus/quick.coffee.md
Quick coffee tips (fenced version for GH syntax highlighting)
@davo
davo / gist:5bae0e49affc117765c796f9c6b8eace
Created August 29, 2017 05:23 — forked from flipjs/gist:f3afa204a7530679eaf4
CoffeeScript Style Guide (using no prototype)
### flipjs.io CoffeeScript Style Guide ###
do ->
############################################################ CLASS ###
class Animal
constructor: (@name) ->
initProps = =>
# These are my notes from the PragProg book on CoffeeScript of things that either
# aren't in the main CS language reference or I didn't pick them up there. I wrote
# them down before I forgot, and put it here for others but mainly as a reference for
# myself.
# assign arguments in constructor to properties of the same name:
class Thingie
constructor: (@name, @url) ->
# is the same as: