Skip to content

Instantly share code, notes, and snippets.

View albertsun's full-sized avatar

Albert Sun albertsun

View GitHub Profile
View 2017-obituaries.tsv
Month Day URL
1 1
1 1
1 1
1 2
1 2
1 2
1 3
1 3
1 4
View .gitconfig
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
lol = log --graph --decorate --pretty=oneline --abbrev-commit --all
dfb = log --left-right --graph --cherry-pick --oneline
View rss-full-text-scrape-to-stevedore.json
"schema_version": 1,
"name": "RSS Full Text Scrape to Stevedore",
"description": "Follows an RSS feed and visits every feed item to save the full text into Stevedore",
"source_url": "",
"guid": "1dcba6751110ed460f0a83273953535e",
"tag_fg_color": "#ffffff",
"tag_bg_color": "#5bc0de",
"exported_at": "2016-04-18T22:41:41Z",
"agents": [
View terraform apply
terraform apply .tfplan
aws_instance.k8s-prd-worker-b.0: Creating...
ami: "" => "ami-1a642670"
availability_zone: "" => "<computed>"
ebs_block_device.#: "" => "<computed>"
ephemeral_block_device.#: "" => "<computed>"
instance_state: "" => "<computed>"
instance_type: "" => "m4.2xlarge"
key_name: "" => "everything"
placement_group: "" => "<computed>"
View fixiekill
javascript:(function(){for(var a=document.querySelectorAll("*"),i=0,e;e=a[i];i++)"fixed"==getComputedStyle(e).position&&("static");}());
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
.bar {
fill: steelblue;
.bar:hover {
fill: brown;
albertsun / circle-segment.js
Created January 29, 2015 18:18
Drawing partial circles with area proportional to a value (good!) or angle proportional to a value (misleading!)
View circle-segment.js
(function() {
var circleSegment = {};
var degreesToRadians = function(deg) {
return deg*Math.PI*2/360;
// takes an angle in radians
// returns 0-1 the proportion of a circle's area
// that a segment bounded by arc of that angle fills

Keybase proof

I hereby claim:

  • I am albertsun on github.
  • I am albertsun ( on keybase.
  • I have a public key whose fingerprint is 9ADB 59B4 410D 33AE DC9B 21D2 E969 C37F 7850 A4AF

To claim this, I am signing this object:

albertsun /
Last active August 29, 2015 13:59
If SAT questions can't interpret charts correctly, what hope do the rest of us have?

If SAT questions can't interpret charts correctly, what hope do the rest of us have?


New SAT Sample questions. Chart and story originally from The Atlantic

See anything wrong with this SAT test question?

There's no correct answer! The question writer seems to want C to be the correct answer but that's a sloppy, too fast and imprecise interpretation of the chart.

albertsun / killstickies.js
Created January 14, 2014 18:57
Save this snippet of javascript as a bookmarklet to kill any fixed top or sidebars on a web page.
View killstickies.js