Skip to content

Instantly share code, notes, and snippets.

// Motor Controls
const int PWMELPin = 10; // Enable PWM Left Motor
const int PWMERPin = 11; // Enable PWM Right Motor
const int L1Pin = 6; // L1 = Left Motor Lead 1
const int L2Pin = 7; // L2 = Left Motor Lead 2
const int L3Pin = 4; // L3 = Right Motor Lead 1
const int L4Pin = 5; // L4 = Right Motor Lead 2
const int LEDPin = 13; // Telltale LED
const int Duration = 2000;
void setup()
@bradllj
bradllj / index.html
Last active January 2, 2016 15:49
World and US States Document Count With Zoom
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.subunit { fill: #aaa; }
.q0-9 { fill:rgb(247,251,255); }
.q1-9 { fill:rgb(222,235,247); }
.q2-9 { fill:rgb(198,219,239); }
.q3-9 { fill:rgb(158,202,225); }
.q4-9 { fill:rgb(107,174,214); }
[{"id":121,"value":"iran","count":2508},{"id":88,"value":"washington","count":1778},{"id":14,"value":"united states","count":1545},{"id":53,"value":"china","count":1513},{"id":86,"value":"new york","count":1166},{"id":224,"value":"us","count":1069},{"id":329,"value":"russia","count":824},{"id":164,"value":"israel","count":757},{"id":123,"value":"america","count":749},{"id":124,"value":"texas","count":615},{"id":161,"value":"california","count":602},{"id":188,"value":"chicago","count":577},{"id":37,"value":"europe","count":574},{"id":5,"value":"florida","count":570},{"id":326,"value":"syria","count":556},{"id":62,"value":"japan","count":555},{"id":122,"value":"american","count":554},{"id":160,"value":"san francisco","count":554},{"id":51,"value":"afghanistan","count":510},{"id":195,"value":"miami","count":449},{"id":186,"value":"dallas","count":435},{"id":268,"value":"detroit","count":434},{"id":95,"value":"los angeles","count":426},{"id":419,"value":"philippines","count":409},{"id":105,"value":"boston","count
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bradllj
bradllj / index.html
Last active January 1, 2016 04:09
World Document Count
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.subunit { fill: #aaa; }
.q0-9 { fill:rgb(247,251,255); }
.q1-9 { fill:rgb(222,235,247); }
.q2-9 { fill:rgb(198,219,239); }
.q3-9 { fill:rgb(158,202,225); }
.q4-9 { fill:rgb(107,174,214); }
#pragma config(Motor, port7, claw, tmotorVex393_MC29, openLoop)
...
void clawopen (int time)
{
motor[claw]=80;
wait1Msec(time);
motor[claw]=0;
}
#pragma config(Sensor, dgtl1, button1, sensorTouch)
#pragma config(Motor, port1, rightback, tmotorVex393_HBridge, openLoop, reversed)
#pragma config(Motor, port2, rightfront, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, arm, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, arm2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, claw, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, leftfront, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port10, leftback, tmotorVex393_HBridge, openLoop)
@bradllj
bradllj / CloudTrailTest
Last active August 29, 2015 14:02
AWS API Audit CloudTrail
//package com.volume.hooks.s3;
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
import com.amazonaws.regions.Region;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.model.GetObjectRequest;
import com.amazonaws.services.s3.model.ListObjectsRequest;
import com.amazonaws.services.s3.model.ObjectListing;