Skip to content

Instantly share code, notes, and snippets.

@indiesquidge
indiesquidge / advanced-react-notes.md
Last active January 19, 2024 15:57
Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react

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 April 1, 2017 22:22
Build Gitbooks for each Git tag of a repository.

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

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 {
/** @jsx React.DOM */
var api = 'http://addressbook-api.herokuapp.com/contacts';
var App = React.createClass({
mixins: [Routed],
render: function() {
return (
<Root>
<Index path="/"/>
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 December 23, 2015 15:49
iOS 7 Safari Notes

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 April 25, 2023 03:57
My gif workflow
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 September 9, 2012 01:06
Base CoffeeScript Class, surprisingly useful.
################################################################################
# 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 November 29, 2011 20:48
Christmas color scheme for 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 November 21, 2011 03:28
Random color scheme for vim
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()