Skip to content

Instantly share code, notes, and snippets.

View ntbrock's full-sized avatar

Taylor Brockman ntbrock

  • Brain Power Software
  • Charleston, SC
View GitHub Profile
@ShawnHymel
ShawnHymel / fred_bot.ino
Last active April 21, 2024 12:38
Use two magnetic encoders to make a robot drive in a straight line for 1 meter
/**
* Adventures in Science: Fred Bot
* SparkFun Electronics
* Author: M. Hord (October 8, 2013)
* Modified by: B. Huang (October 31, 2014)
* Modified by: Shawn Hymel (July 21, 2017)
*
* Use two magnetic encoders on Fred's motor shafts (48:1
* gearbox, 60mm wheels) to make him move in a straight line for
* 1m.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ntbrock
ntbrock / gist:6049260
Created July 21, 2013 17:37
PartialView Controller Example. Play Framework 2.1.x Scala. Usage in conf/routes: GET /:controller/_:partial controllers.PartialView.render(controller:String, partial: String) Define this view file: app/views/DemoSix/_helloPartialWorld.scala.html Usage in Browser URL bar: http://localhost:9000/DemoSix/_helloPartialWorld Easy method to use partia…
package controllers
import java.lang.reflect.Method
import play.api._
import play.api.mvc._
import play.api.libs.{ Comet }
import play.api.libs.iteratee._
import play.api.libs.concurrent._
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"