Skip to content

Instantly share code, notes, and snippets.

View toolness's full-sized avatar

Atul Varma toolness

View GitHub Profile
@toolness
toolness / calc-react-migration.md
Last active September 10, 2018 13:11
Converting CALC from JQuery to React + Redux

Converting CALC from JQuery to React/Redux

At the end of 2016, the [CALC][] team experimented with converting the single-page app on its front page, referred to as the [Data Explorer][], from JQuery to React + Redux.

Rationale

We inherited the [1350-line explorer.js][explorer-1] from a previous team. This code was written under different project and time constraints,

@toolness
toolness / docker-shortcuts.md
Last active March 1, 2017 16:31
Docker shortcuts

This document just conventionalizes some practices laid out in 18F/calc#1406, making it a bit easier to run commands in docker containers without having to constantly prefix them with e.g. docker-compose run app.

Global setup

Using this convention requires first modifying one's .bashrc:

@toolness
toolness / docker-thoughts.md
Last active March 26, 2019 15:21
Reflections on Docker-based development

Reflections on Docker-based development

Note that these reflections are specifically tailored to a conversation about Docker we're having at 18F, and as such they have a few assumptions:

Advantages

@toolness
toolness / haskellbook-notes.md
Last active November 27, 2016 16:17
Haskellbook notes

The following are notes about haskellbook.

Sample content

Because the sample content begins with installing Haskell and a "Hello, World" program, I had assumed that the first chapter (which is not in the sample content) is simply some kind of introduction. However, once the sample content starts mentioning the Lambda Calculus, I got confused, thinking that perhaps the book was assuming prior knowledge about it.

It was only later that I realized that the first chapter is actually about the Lambda Calculus. It'd be

@toolness
toolness / git_branch_and_docker_machine_prompt.sh
Created September 15, 2016 14:23
Bash script to add git branch and docker machine info to prompt
#! /bin/bash
# Most of this is taken from:
#
# https://coderwall.com/p/fasnya/add-git-branch-name-to-bash-prompt
#
# Just modified it to also include the current docker machine being
# used, if any.
parse_git_branch() {
@toolness
toolness / summerhill.md
Last active April 27, 2016 12:13
Summerhill

To be clear, Summerhill is a book by A.S. Neill that I've never read, and it's apparently named after an English boarding school. According to Wikipedia:

Summerhill, founded in the 1920s, is run as a children's democracy under Neill's educational philosophy of self-regulation, where kids choose whether to go to lessons and how they want to live freely without imposing on others. The school makes its rules at a weekly schoolwide meeting where students and teachers each have one vote alike.

The book was apparently well-received at the time of its release in 1960; it sold two million copies over the next decade, was included in over 600

@toolness
toolness / jquery-exercises.md
Last active June 16, 2022 16:30
jQuery Exercises

Here are some mini exercises to challenge your jQuery skills a bit.

Instructions

Create a new page on jsbin.com and add the following script tag to it:

<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
@toolness
toolness / i7.Dockerfile
Created January 21, 2016 02:04
Inform 7 Dockerfile
FROM alpine:3.3
ENV INFORM_RELEASE 6M62
RUN set -ex \
&& apk add --no-cache --virtual .fetch-deps curl \
&& apk add --no-cache --virtual .run-deps perl util-linux \
&& curl http://inform7.com/download/content/${INFORM_RELEASE}/I7_${INFORM_RELEASE}_Linux_all.tar.gz \
> /inform.tar.gz \
&& apk del .fetch-deps \
@toolness
toolness / adventures-in-python-core-dumping.md
Last active January 9, 2024 11:53
Adventures in Python Core Dumping

Adventures in Python Core Dumping

After watching Bryan Cantrill's presentation on [Running Aground: Debugging Docker in Production][aground] I got all excited (and strangely nostalgic) about the possibility of core-dumping server-side Python apps whenever they go awry. This would theoretically allow me to fully inspect the state of the program at the point it exploded, rather than relying solely on the information of a stack trace.

@toolness
toolness / processing-fellowship-proposal.md
Last active April 1, 2016 18:55
Processing Fellowship Proposal

UPDATE: Progress on this fellowship can be followed at http://processing.toolness.org/.

About Us

Jess Klein

If you ask about her passions, Jess will draw you a venn diagram with the words community, freedom, and learning, and point to the sweet spot where all three overlap. She is dedicated to connecting people and ideas through