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
# cat geoFail2Ban.sh
#!/bin/sh
export TMP_F2B='/tmp/fail2ban.cut'
cat /var/log/fail2ban.log|grep Ban|cut -f 7 -d ' ' > $TMP_F2B
while read p; do
echo -n $p
geoiplookup $p
@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._
@ntbrock
ntbrock / index.scala.html
Last active December 19, 2015 04:09
2013Jun30 app/views/index.scala.html
@(message: String)
<!-- Pre-requisite: Browser requests main page: /index via GET ( This page loads in DOM ) -->
@main("Example AJAX Partial Search Form") {
<!-- Step 2 : Page defines a submit button plus empty div#searchResults landing zone</li> -->
<div id="searchForm">
Form