Skip to content

Instantly share code, notes, and snippets.

View aboutaaron's full-sized avatar

Aaron Williams aboutaaron

View GitHub Profile
@aboutaaron
aboutaaron / notes.md
Created July 25, 2014 19:14
srccon-javascript

# When to scrape
## What is web scraping
The process of harvesting or collecting information from a web page
Automating server request
Can be done by writing a script (code) or with paid software tools, e.g., Helium Scraper
Can even be done simply by using Excel and wget
/*!
* toggleAttr() jQuery plugin
* @link https://gist.github.com/aboutaaron/6916c539db4ee9f66d51
* @description .toggleClass() but for attrs. Useful for toggling classes with SVGs or anything that's not a class
* @author Aaron Williams <http://aboutaaron.com/>
* @thanks: Mathias Bynens <http://mathiasbynens.be/> for original
*/
jQuery.fn.toggleAttr = function(attr, value) {
return this.each(function() {
var $this = $(this);
#!/bin/sh
echo "updating ubuntu"
sudo apt-get -qq update
sudo apt-get -qq upgrade
# development
echo "installing development tools"
sudo apt-get -qq install build-essential
@aboutaaron
aboutaaron / montdor
Created November 4, 2013 06:46
Gen Hack Day 2
# Jackie Goldberg, Yahoo Design @montdor
## 5 ides for content design
1. *INNOVATE*
- Disrupt with balance [life line to hang on to]
- Honor Nielson's Law of Internet UX
- make diversity meaningful
2. *CLARIFY*
@aboutaaron
aboutaaron / miso.ds.deps.ie.0.4.1.custom.js
Created October 29, 2013 21:06
custom version of miso dataset with Moment 2.7 instailled
/**
* Miso.Dataset - v0.4.1 - 11/19/2012
* http://github.com/misoproject/dataset
* Copyright (c) 2012 Alex Graul, Irene Ros;
* Dual Licensed: MIT, GPL
* https://github.com/misoproject/dataset/blob/master/LICENSE-MIT
* https://github.com/misoproject/dataset/blob/master/LICENSE-GPL
*/
//! moment.js
/* USAGE:
$(function(){
var steps = new Stepper("#steps");
steps.addSlide(1, function(){ this.canvas.text("slide 1"); });
steps.addSlide(2, function(){ this.canvas.text("slide 2"); });
steps.go();
});
*/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="keywords" lang="de" content="Zeitleiste, Zeitlinie, Zeitkarte, Geschichte, Chronologie">
<meta name="keywords" lang="en" content="Timeline, Timemap, History, Chronology">
<title>Timeline - Proof-of-concept</title>
<!-- That's my local d3 path. When working locally, use your local path. -->
@aboutaaron
aboutaaron / iterate.js
Created September 5, 2013 17:42
Iterate over DOM nodelist in JavaScript. A reminder.
[].forEach.call(
document.querySelectorAll('.awsome'),
function(el){
doStuffWith(el);
}
);
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.deb
sudo dpkg -i elasticsearch-0.90.0.deb