Skip to content

Instantly share code, notes, and snippets.

🤷‍♂️
...

Aaron Franks af

View GitHub Profile
@af
af / components.md
Last active Jan 25, 2016
Presentational/Container components: are these terms misleading?
View components.md

Presentational/Container have long been suggested as terms to describe two different classes of React components. However I think these terms are a bit deceptive, and don't accurately represent the differences between them:

Presentational components

  • can "contain" other components, thus they also act as containers
  • not concerned merely with "presentation" (in the same way that CSS is)

Container components

  • do more than simply "contain" other components. Containing other components is not what makes them unique
  • have an active role in accessing and mutating the state of your application. This is what differentiates
View dan_dan_noodles.md

Dan Dan noodles

  • 4 wrapped packages of soba noodles. There are usually 3 in a big package
  • 1/2 cucumber
  • 1 red pepper
  • 3 medium carrots
  • 2/3 cup chopped cilantro
  • 2/3 cup chopped thai basil

For sauce

View .nvimrc
" Navigating between buffers:
map! <C-k> <esc>:bp<CR>
map <C-k> :bp<CR>
map! <C-l> <esc>:bn<CR>
map <C-l> :bn<CR>
View richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

View bench.js
var React = require('react')
var d = require('./index')(React)
// Simple benchmark for testing the effectiveness of memoization for JSnoX
// Usage: "time node bench.js", with and without the patch in question.
for (var i=0; i<10000; i++) {
d('input:email.test.test2')
d('div.foo')
d('section.foo', { className: 'baz', id: 'asdf' })
}
View mac-curl-ca-bundle.sh
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
View test.styl
.donut_chart
.slice
stroke: white
stroke-width: 2px
for colour, i in $donut_colours
&:nth-child({i})
fill: colour
@af
af / devtools.txt
Created May 16, 2014
Devtools tips
View devtools.txt
https://developer.chrome.com/devtools/docs/tips-and-tricks
* Cmd-Shift-C for inspector
* Sources panel
* Debugger keyboard shortcuts (F8-F11)
* breakpoints
* conditional breakpoints
* evaluating console in breakpoint's context
* scope variables- jump to definition
View keybase.md

Keybase proof

I hereby claim:

  • I am af on github.
  • I am af (https://keybase.io/af) on keybase.
  • I have a public key whose fingerprint is AD26 0A22 0DE0 ADCE EA2E 0786 8F43 397F 2B4F 59A6

To claim this, I am signing this object:

@af
af / .jshintrc
Created Mar 1, 2013
Current jshintrc settings
View .jshintrc
{
// JSHint Settings config
// See http://www.jshint.com/options/ for a full description of these (and some more) options.
//
// Comments are used liberally, even though they are not valid inside JSON. Make sure
// they are stripped out before running JSON.parse on this file.
// JSHint Running
"passfail" : false, // Stop on first error if this is true.
"maxerr" : 100, // Maximum errors before stopping.
You can’t perform that action at this time.