Skip to content

Instantly share code, notes, and snippets.

Avatar

Lou Acresti namuol

View GitHub Profile
@namuol
namuol / sf-stop-the-spread.md
Last active Mar 10, 2020
Petitions to Stop the Spread of Coronavirus in San Francisco
View sf-stop-the-spread.md

🌱 This is a living document - please comment, fork, or tweet at @louroboros to contribute.

Thank you!

Citizens of San Francisco have a right to know what our leaders are planning to do to slow/stop the spread of Coronavirus in our city.

We know now that community spread is already happening here in SF, which means it's only a matter of time before we need to take more drastic measures to encourage (or enforce) a higher degree of social distancing to "flatten the curve" and avoid a worst-case-scenario where our healthcare infrastructure is overwhelmed, all at once, like it is happening today (March 9th) in Italy ([1], [2], [3]).

Even if we assume the Mayor London Breed, SFUSD Superintendent Dr. Vincent Matthews, and other local community leaders have a plan to take dramatic action when the time is right, th

@namuol
namuol / principals-of-the-american-cargo-cult.md
Last active Dec 30, 2019
Principals of the American Cargo Cult
View principals-of-the-american-cargo-cult.md

Source: https://web.archive.org/web/20030812081806/http://klausler.com/cargo.html

Principles of the American Cargo Cult

I wrote these principles after reflecting on the content of contemporary newspapers and broadcast media and why that content disquieted me. I saw that I was not disturbed so much by what was written or said as I was by what is not. The tacit assumptions underlying most popular content reflect a worldview that is orthogonal to reality in many ways. By reflecting this skewed weltanschauung, the media reinforces and propagates it.

I call this worldview the American Cargo Cult, after the real New Guinea cargo cults that arose after the second world war. There are four main points, each of which has several elaborating assumptions. I really think that most Americans believe these things at a deep level.

Ignorance is a virtue

View SketchSystems.spec
Button*
unlocked*
default*
mouseEnter -> hovered
hovered
mouseLeave -> default
mouseDown -> pressed
@namuol
namuol / Dataloader.js
Last active Sep 20, 2017 — forked from acdlite/Dataloader.js
Idea for Dataloader component
View Dataloader.js
// The `loader` argument is a Dataloader instance
// https://github.com/facebook/dataloader
const makeLoader = (loader) => {
class Dataloader extends React.Component {
state = {data: null, isLoaded: false};
componentWillMount() {
this.prefetchData(this.props);
}
componentWillReceiveProps(nextProps) {
if (this.props.id !== nextProps.id) {
@namuol
namuol / .block
Last active Sep 6, 2016 — forked from monfera/.block
SVG heat shimmer
View .block
license: mit
border: no
height: 420
View SimpleList.js
const styles = StyleSheet.create({
list: { /* etc */ },
hover: { /* etc */ },
});
export default class List extends React.Component {
static propTypes = {
style: React.PropTypes.style,
hoverStyle: React.PropTypes.style,
};
View dynamic_styles_with_react_free_style.js
var Style = require('react-free-style').create()
var BUTTON_STYLE = Style.registerStyle({
backgroundColor: 'red',
padding: 10
})
var ButtonComponent = Style.component(React.createClass({
// You must define `contextTypes` to access `freeStyle`.
@namuol
namuol / example.coffeex
Last active Aug 29, 2015
CoffeeX Syntax Concept (JSX for CoffeeScript)
View example.coffeex
MySimpleComponent = React.createClass
render: -> <pre>{@props.mytext}</pre>
MyComponent = React.createClass
render: ->
<ul>
@props.items.map (item) =>
<li><a href="#" onClick={@props.handleClick}>{item}</a></li>
</ul>
@namuol
namuol / line-highlights.coffee
Last active Dec 16, 2015
Node.js: Line highlights in Markdown using marked + pygmentize
View line-highlights.coffee
#
# Inspired by http://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/
# by Paul O'Shannessy
#
marked = require 'marked'
pygmentize = require 'pygmentize-bundled'
renderer = new marked.Renderer()
renderer.code = (code, lang) ->
return "<div class='highlight'><code class='#{lang.split('{')[0]}'><pre>#{code}</pre></code></div>"
You can’t perform that action at this time.