Skip to content

Instantly share code, notes, and snippets.

View mhkeller's full-sized avatar

Michael Keller mhkeller

View GitHub Profile

NodeTogether Curriculum

Step 0. git Up and Running

Github

Github is where we will store all our code and collaborate on it with others. Make an account here: https://github.com/

git

git is a way to keep track of your projects as they change.

@dannguyen
dannguyen / unix-spell-checker-fun.md
Last active February 5, 2016 02:12
How to write a transcription of a video describing a UNIX spell checker

In progress: Attempting to write a set of command-line steps to process IBM Watson Speech-to-Text data to transcribe an old video about UNIX.

UNIX: Making Computers Easier To Use -- AT&T Archives film from 1982, Bell Laboratories

via this HN discussion: https://news.ycombinator.com/item?id=10789019

The discussion of the spell checker starts at the 5th minute with Brian Kernighan: https://www.youtube.com/watch?v=XvDZLjaCJuw&t=5m15s

It continues at the 13th minute with Lorinda Cherry: https://youtu.be/XvDZLjaCJuw?t=13m47s

@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@mhkeller
mhkeller / README.md
Last active January 18, 2018 15:27
Count elements in a pgsql array_agg. Adapted to work with any typed array (numeric, text etc.) and more readable formatting from https://wiki.postgresql.org/wiki/Count_elements_in_Array

Count elements

Basic example

select count_elements('{1,2,3,4,2,1,2,3,4,5,3,1,2,3,43,1,2,3}'::text[]);

-[ RECORD 1 ]--+------------------------------
count_elements | 3(5) 2(5) 1(4) 4(2) 5(1) 43(1)
@veltman
veltman / gist:7e65d96b93403f8cbc77
Created January 22, 2015 23:01
Saving tiles locally
var request = require("request"),
fs = require("fs"),
xyz = require("xyz-affair"),
queue = require("queue-async")(10), //max concurrency
path = require("path"),
mkdirp = require("mkdirp");
var bounds = [
[
-74.00596618652344,
@amandabee
amandabee / use_git.md
Last active August 29, 2015 14:03
You should use Git

Git is a version control system. Github is a proprietary hosting service that manages central git repositories. A git repository doesn't have to be public, but there are some great free hosts available if you do want to make your work available. Github, obviously, or Gitorious, especially if you're offended by github's ugly gender politics. Github's GUI is much nicer than any generalized Git GUI's I've seen, which is a vote for using Github, but it really doesn't matter.

So here are a few good reasons you should use git to manage teaching materials:

  • Greg Wilson explains it pretty well to a Python conference. You have to listen to him talk about a few other things first, but the whole talk is interesting so go ahead.

Any newsroom with an

@davidmcooper
davidmcooper / gist:5cd3e30572583b3f8815
Last active August 29, 2015 14:01
Bookmarklet for Adding Sort-By-Date to a Google Search
Create a new bookmark in your browser's book toolbar, but instead of bookmarking a URL, include the following code. This will create a button which, when-clicked, will add the necessary parameters to include sort-by-date functionality to your Google search. This button should only be used after you've already searched for something in Google.
javascript:(function(){location.href=location.href+'&tbs=sbd%3A1%2Ccdr%3A1%2Ccd_min%3A1%2F1%2F1800%2Ccd_max%3A&tbm=';})();
@wilson428
wilson428 / package.json
Created January 8, 2014 05:22
Recreate the Atlantic's Netflix category data using NodeJS. Requires a Netflix login.
{
"name": "netflix-category-scraper",
"version": "0.0.0",
"description": "Collect all categories from Netflix",
"dependencies": {
"cheerio": "*",
"sqlite3": "*",
"request": "*"
},
"author": {
@andrewxhill
andrewxhill / sql_statements.sql
Created December 8, 2013 18:53
Fun SQL statements for CartoDB
--PART 2
-- a.
SELECT * FROM tornados
SELECT cartodb_id FROM tornados
-- b.
SELECT * FROM tornados LIMIT 1
SELECT * FROM tornados LIMIT 1 OFFSET 1
SELECT * FROM tornados ORDER BY damage DESC LIMIT 10
-- c.
SELECT * FROM tornados WHERE cartodb_id < 30