Skip to content

Instantly share code, notes, and snippets.

View VinSpee's full-sized avatar
🏠
Working from home

Vince Speelman VinSpee

🏠
Working from home
View GitHub Profile
@bradfrost
bradfrost / gist:9856884
Last active August 29, 2015 13:57
Using Grunt with Pattern Lab
module.exports = function(grunt) {
// Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
patternlab: {
command: "php core/builder.php -gp"
}
},
@tbremer
tbremer / SassMeister-input-HTML.html
Created May 6, 2014 15:13
Generated by SassMeister.com.
<div class="tester"></div>
<div class="tester2"></div>
<div class="tester3"></div>
@MoOx
MoOx / gulpfile.js
Last active January 4, 2016 00:39
My current gulfile- CSS with rework- JS with Browserify & lots of transfo (mainly jadeify)- HTML with jade- & some static files workingInclude a static server with livereload.
///
var pkg = require("./package.json")
, rimraf = require("rimraf")
, gulp = require("gulp")
, gutil = require("gulp-util")
, filter = require("gulp-filter")
, plumber = require("gulp-plumber")
, concat = require("gulp-concat")
gulp.task("clean", function() {
<!DOCTYPE html>
<html>
<head>
<title>Customized range slider, pure CSS</title>
<style>
body {
background: #f8f8f8;
}
.slider {
width: 302px;
@anyong
anyong / ActionTypes.js
Last active January 22, 2016 21:32
React Redux Router
export const LOGIN_REQUEST = 'LOGIN_REQUEST';
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
export const LOGIN_FAILURE = 'LOGIN_FAILURE';
export const LOGOUT = 'LOGOUT';
@spoike
spoike / reactjs_componentapi_cheatsheet.md
Created May 13, 2014 07:51
React JS Cheatsheets for Component API, Specifications and Lifecycle

ReactJS Component Cheatsheet

To create a ReactComponent:

ReactComponent React.createClass(object proto)

Basic JSX example:

var TitleComponent = React.createClass({

// REQUIRED

@vincentriemer
vincentriemer / VideoProgressSlider.js
Created July 21, 2019 18:29
The current (WIP) implementation of chonkit's video progress slider.
/**
* @flow
*/
import VisuallyHidden from "@reach/visually-hidden";
import instyle from "instyle";
import * as React from "react";
import { Focus } from "react-events/focus";
import { Drag } from "react-events/drag";
import { Press } from "react-events/press";
@paularmstrong
paularmstrong / react-native-web_v0.x.x.js
Last active March 4, 2020 04:18
Ensure you add `module.name_mapper='^react-native$' -> 'react-native-web'` to your `.flowconfig` options
// @flow
// flow-typed signature: aa279642a4cb992a390fedc5acdc896d
// flow-typed version: react-native_v0.5.0/flow_v0.65.0
type RNW$Dimension = {| fontScale: number, height: number, scale: number, width: number |};
type RNW$DimensionsObject = {| window: RNW$Dimension, screen: RNW$Dimension |};
type RNW$StyleObject = { [key: string]: * };
type RNW$Style = mixed;
type RNW$Styles = RNW$StyleObject | RNW$Style | Array<RNW$Styles>;
@nathansmith
nathansmith / [1] superSuit.js
Last active May 11, 2020 20:44
Basic examples of currying in JavaScript.
// Our currying wrapper.
function superSuit (a) {
return function (b) {
return 'I can now ' + b + ' like ' + a + '.';
}
}
// Get the suit ready.
var ironman = superSuit('Iron Man');
@ohanhi
ohanhi / joy-of-composition.md
Last active February 3, 2021 18:14
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views