Skip to content

Instantly share code, notes, and snippets.

@sahrens
sahrens / React Native: Animated - Code
Last active July 4, 2020 00:07
Example code from ReactEurope 2015 talk - React Native: Animated
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@sebmarkbage
sebmarkbage / Enhance.js
Last active February 10, 2025 06:23
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@jerico
jerico / photobooth.sh
Created December 21, 2011 17:01
Very rough photobooth script using gPhoto2, ImageMagick, and CUPS.
#! /usr/bin/env bash
# Extremely rough photobooth bash script
# It depends on the following:
# - gPhoto2: for camera control through usb
# - ImageMagick: photo-manipulation suite
# - CUPS: printer driver with command-line printing utilities
# - beep: for the countdown sound
save_dir=./processed