Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Florence ryanflorence

View GitHub Profile
View advanced-react-notes.md

Advanced React by React Training

Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react

Granted this is a contrived example, but it's still something I took notice to: in those "Advanced React" videos I've been watching, Ryan Florence codes very slowly, and does not make one quick change and jump back to the browser to see what changed.

He stops and thinks. He asks himself (or the viewer) questions. He wonders what

@hedgerh
hedgerh / README.md
Last active Apr 1, 2017
Build Gitbooks for each Git tag of a repository.
View README.md

Setup:

Set permissions to allow script to run

chmod a+x ./gitbook-tag-build.sh

Usage:

Choose an output folder, and an input file containing a list of Git tags.

The default ouput folder is _allBooks and the default input is .gitbook-tags

View createStore.js
var EventEmitter = require('events').EventEmitter;
var mergeInto = require('react/lib/mergeInto');
module.exports = createStore;
function createStore(initialState) {
var events = new EventEmitter();
var state = initialState || {};
return {
View app.js
/** @jsx React.DOM */
var api = 'http://addressbook-api.herokuapp.com/contacts';
var App = React.createClass({
mixins: [Routed],
render: function() {
return (
<Root>
<Index path="/"/>
View fast-select.js
var get = Ember.get, set = Ember.set, doc = document;
var FastSelectComponent = Ember.Component.extend({
items: null,
valuePath: 'value',
labelPath: 'label',
value: null,
selected: null,
tagName: 'select',
@linjunpop
linjunpop / README.md
Last active Dec 23, 2015
iOS 7 Safari Notes
View README.md

CSS font values

-apple-system-headline1
-apple-system-headline2
-apple-system-body
-apple-system-subheadline1
-apple-system-subheadline2
-apple-system-footnote
-apple-system-caption1
@SlexAxton
SlexAxton / .zshrc
Last active Mar 29, 2022
My gif workflow
View .zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@ryanflorence
ryanflorence / Base.coffee
Created Sep 9, 2012
Base CoffeeScript Class, surprisingly useful.
View Base.coffee
################################################################################
# script: Base.coffee
# author: Ryan Florence <rpflorence@gmail.com>
# license: MIT-Style License
#
# A surprisingly useful base class for CoffeeScript. Inspired by my old
# friend, MooTools Class. Provides default options, mixins, and custom events.
class Base
defaults: {}
@ryanflorence
ryanflorence / christmas.vim
Created Nov 29, 2011
Christmas color scheme for Vim
View christmas.vim
" ------------------------------------------------------------------
" Filename: christmas.vim
" Last Modified: Nov, 29 2011
" Version: 1
" Maintainer: Nobody, jacked from SM Smithfield (m_smithfield AT yahoo DOT com)'s Marklar
" Copyright: 2006 SM Smithfield
" This script is free software; you can redistribute it and/or
" modify it under the terms of the GNU General Public License as
" published by the Free Software Foundation; either version 2 of
" the License, or (at your option) any later version.
@ryanflorence
ryanflorence / .vimrc
Created Nov 21, 2011
Random color scheme for vim
View .vimrc
function RandomColorScheme()
let mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n")
exe 'so ' . mycolors[localtime() % len(mycolors)]
unlet mycolors
endfunction
call RandomColorScheme()
:command NewColor call RandomColorScheme()