Skip to content

Instantly share code, notes, and snippets.

@cfarm
cfarm / GDI Town Hall questions
Created January 11, 2019 17:44
GDI Town Hall Jan 11, 2019 12pm questions
GDI Town Hall
QUESTIONS
GDI Town Hall
Jan 9 – 11, 2019
#8688
46 questions
Popular
@cfarm
cfarm / JAWS vs VoiceOver screen readers.md
Last active May 4, 2023 12:51
JAWS vs VoiceOver: What JAWS, VoiceOver and other screen readers have in common and where they differ, plus how this should be considered in the design and development process
@cfarm
cfarm / learning-git.md
Created September 6, 2017 21:25
Learning Git
@cfarm
cfarm / credit-data.md
Last active December 6, 2016 18:39
how i'm working with the data

Getting the data from Github

I am using d3's built in .csv method to get the data.

I save the data file url directly as a constant for right now. Later, I'm planning to provide an array or object with data urls (or use Github API to get them) so we can loop through each data file and generate the graph for each.

Formatting the data

I update some of the fields in the JS (not the original file) to make them easier to work with:

  1. make the number fields number type
  2. Change 'seasonally adjusted' to true and 'unadjusted' to false for easy conditionals
@cfarm
cfarm / cfgov-refresh front end notes.md
Last active June 27, 2016 16:55
cfgov-refresh front end notes

front end walk through notes

  • frontend.sh setup script running locally to build front end

  • scripts.js - builds bundles including modernizr, es-5.shim in global header

  • base.html: base HTML template

-webpack to bundle stuff. webpack-config.js.

  • common_bundle used on all pages
@cfarm
cfarm / emoji-ps1.md
Last active January 29, 2016 17:13
put emoji in your command line prompt
  1. Show hidden files on your Mac. Open Terminal and run these commands (doesn't matter in what folder): (ref):
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder
  1. In Finder, go to your user directory and open the .bash_prompt file with Sublime Text. Note: if you don't have any fancy .bash_prompt stuffs you can steal mine from here. It will give you pretty colors + a kitten emoji to start with.
  2. Go to line 57 and find the emoji that's there. Click on line 59 and go to "Edit > Special Characters."
  3. Click the little keyboard icon in the top right window that pops up.
  4. Choose your emoji and right click it to "Copy character info"
  5. Paste that business into line 59 of the file.
@cfarm
cfarm / points-min.js
Last active March 12, 2019 21:54
POINTS!!
javascript:!function(){for(var c=document.getElementsByClassName("IssueLabel"),a=0,d=0;d<c.length;d++){var b=c[d].innerText;-1!=b.indexOf("points: 13")?a+=13:-1!=b.indexOf("points: 8")?a+=8:-1!=b.indexOf("points: 5")?a+=5:-1!=b.indexOf("points: 3")?a+=3:-1!=b.indexOf("points: 2")?a+=2:-1!=b.indexOf("points: 1")&&(a+=1)}document.querySelector(".progress-bar").style.marginRight="10px";c=document.createElement("span");a=document.createTextNode(" "+a+" points!");c.appendChild(a);document.querySelector(".js-project-header h3").appendChild(c)}();
@cfarm
cfarm / points.js
Last active March 12, 2019 21:52
Bookmarklet to add up Github labels for points on project boards
javascript:!function(){
var labels=document.getElementsByClassName("IssueLabel");
var pointsCount = 0;
for (var i=0; i < labels.length; i++) {
var label = labels[i],
labelText = label.innerText;
if (labelText.indexOf("points: 13") != -1) {
@cfarm
cfarm / pullrequest.js
Created July 28, 2015 18:27
pull request checklist
javascript:!function(){var a=document.getElementById("pull_request_body");a&&(a.value+="Short description explaining the high-level reason for the pull request\n\n## Additions\n\n- \n\n## Removals\n\n- \n\n## Changes\n\n- \n\n## Testing\n\n- \n\n## Review\n\n- @user\n\n## Screenshots\n\n## Todos\n\n- \n\n## Checklist\n\n* [ ] Changes are limited to a single goal (no scope creep)\n* [ ] Code can be automatically merged (no conflicts)\n* [ ] Code follows the standards laid out in the [front end playbook](https://github.com/cfpb/front-end)\n* [ ] Passes all existing automated tests\n* [ ] New functions include new tests\n* [ ] New functions are documented (with a description, list of inputs, and expected output)\n* [ ] Placeholder code is flagged\n* [ ] Visually tested in supported browsers and devices \n* [ ] Project documentation has been updated (including the \"Unreleased\" section of the CHANGELOG)\n\n")}();
@cfarm
cfarm / codereview.js
Created July 28, 2015 18:16
code review checklist
javascript:!function(){var a=document.getElementById("new_comment_field");a&&(a.value+="### Code Review Checklist\n\n\* [ ] Do the changes address the project's needs?\n* [ ] Do the changes respect the project's existing style?\n* [ ] Does the new code avoid reproducing existing functionality?\n* [ ] Are functions as simple as possible?\n* [ ] Is the code as efficient as possible?\n* [ ] Is the usage of each function clear?\n* [ ] Have edge cases been considered and tested for?\n")}();