Skip to content

Instantly share code, notes, and snippets.

@kosamari
kosamari / what-I-learned.md
Created June 15, 2015 13:43
What I learned from reading PRs and issues on 'What is Code?' repo

Programmers likes to fix things. When there is a typo in your code, then your code won't work. There are many requests to fix typo in the article from inconstant numbering in footnotes to wrong filename for images. When spotting someone's mistake, get creative and title your PR like "Instagram is only worth 1 Instragram not 2 Instragrams". Programmer's attention to detail extends not only the article itself, but also the license doc in the repo.

Don't forget to fact check before spotting mistake though. It's important. Keyword to use is AFAIK and can confirm.

Programmers love to know the source of information. There are few requests to add hyperlinks to contents referenced in the article. Some are from original autho

@jsermeno
jsermeno / perspectiveProject.js
Created June 5, 2011 03:19
Three.js Transform 3D coordinates to screen coordinates and back in perspective projection - http://catchvar.com/threejs-game-transforming-isometric-screen-co
var
projector = new THREE.Projector(),
p3D = new THREE.Vector3(25, 15, 9),
p2D;
p2D = projector.projectVector(p3D, camera);
p3D = projector.unprojectVector(p2D, camera);
@Rich-Harris
Rich-Harris / linearScale.js
Last active May 4, 2016 19:57
A simple linear scale function generator, similar to D3's
(function ( global ) {
'use strict';
var linearScale = function ( domain, range ) {
var d0 = domain[0], r0 = range[0], multiplier = ( range[1] - r0 ) / ( domain[1] - d0 );
// special case
if ( r0 === range[1] ) {
return function () {
@tmcw
tmcw / comprehensive_documentation.md
Created March 25, 2015 14:46
Comprehensive Documentation

Software is layered.

Documentation is not. If your documentation states

Run npm install foo to install this module

It is really saying

@ncase
ncase / GLOGS.md
Last active January 20, 2017 19:04
GLOGS

"Do and Show and Tell"

###Do & Show & Tell

Don't try to explain everything with something interactive. Use interactivity only when interactivity works best, otherwise, supplement it with text & images. Also keep in mind the overlaps of Do & Show & Tell: when text interacts with the diagrams (e.g. Tangle), and vice versa.

Text: Best at describing very abstract concepts.
Graphs: Best at showing broad relationships at a glance.
Animations: Best at showing temporal relationships.
Interactives: Best at showing processes, systems, models. (See final slide on Procedural Rhetoric)

@mbostock
mbostock / .block
Last active August 27, 2017 21:09 — forked from dustin/index.html
Text Along a Path
license: gpl-3.0

Clojure is for Aristotelians

I was reading ["Clojure is for Type B Personalities"][2] and it sparked some thoughts I had about the intersection of western philosophy and programming.

One could say Mathematics is an extension of Epistemology. And all theory about computability are an extension of mathematics. I reckon how one thinks about computability and how one writes computable functions are a reflection of a person's natural epistemological tendencies. This is going to be just as unscientific as ["Clojure is for Type B Personalities"][2], but hopefully another

@yanofsky
yanofsky / jobsday_static_charts.sh
Created April 4, 2014 13:09
QZ Two simple charts script
#download the data and save it as json for the overview via a python script
cd overview
python overview_scraper.py
cd ../sector
#download the data and save it as json for the sector info via python script
python sector_scraper.py
cd ..
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@elaineo
elaineo / podcast.py
Last active March 16, 2019 21:19
Turn podcasts into Twitter threads
from TwitterAPI import TwitterAPI
import json
import logging
import time
from collections import OrderedDict
from random import random
"""
Assume 3 participants. You will need to create a Twitter account for each participant, and get API keys for each one.
"""