Skip to content

Instantly share code, notes, and snippets.

View rockymadden's full-sized avatar
Setting status

Rocky Madden rockymadden

Setting status
  • UiPath
  • Pale Blue Dot
View GitHub Profile
rockymadden /
Last active October 30, 2018 00:54
socat examples

Effectively tail a file and serve it up via a browser:

socat -T0.05 -u FILE:/var/log/syslog,ignoreeof TCP4-LISTEN:12345,fork,reuseaddr

Simple file server


name: inverse layout: true class: center, middle, inverse

#Gist => Deck

rockymadden / build.gradle
Last active June 27, 2018 15:01
Deploy a Gradle Scala project to Maven Central, or any Maven repository for that matter, based upon the presence of variables in your file. Plays nicely with continuous integration tools like Travis-CI.
View build.gradle
apply plugin: 'maven'
apply plugin: 'scala'
apply plugin: 'signing'
def isMavenDeployable = hasProperty('mavenRepositoryUrl') &&
hasProperty('mavenRepositoryUsername') &&
if (isMavenDeployable) {
signing {
rockymadden /
Last active May 31, 2018 01:33
Scala bash script header. Nice because it will automatically load jars in the same directory into the classpath. I use it when making thin CLI wrappers around sibling projects APIs. Works on all OS X and Debian machines I have tried.
dir="`dirname \"$0\"`"
dir="`( cd \"$dir\" && pwd )`"
cp=`echo $dir/*.jar|sed 's/ /:/g'`
exec scala -classpath "$cp" -savecompiled "$0" "$@"

Keybase proof

I hereby claim:

  • I am rockymadden on github.
  • I am rockymadden ( on keybase.
  • I have a public key ASAeoRru5wuha4ttFt1zbI5_qgGIqmPCy4VHntQvOCUnOgo

To claim this, I am signing this object:

rockymadden / combinators.js
Created February 20, 2018 13:51 — forked from Avaq/combinators.js
Common combinators in JavaScript
View combinators.js
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
rockymadden /
Last active February 23, 2016 20:57 — forked from greglindahl/
Developer Portal pitch

The Pitch

Let's move to a modern approach for our developer documentation and, generally, improve developer experiences by creating a focused developer portal. Let's unify our documentation efforts, use documentation to reduce customer success needs, use documentation to improve experiences, and create a one-stop-shop for anything a developer might need. Additionally, lets make it conceptually simple and easy to maintain and support. This idea is not new, in fact nearly every modern API company uses this approach:

View Functor.scala
trait Functor[T[_]]{
def fmap[A,B](f:A=>B)(ta:T[A]):T[B]
trait Applicative[T[_]] extends Functor[T]{
def pure[A](a:A):T[A]
def <*>[A,B](tf:T[A=>B])(ta:T[A]):T[B]
trait Monad[M[_]] extends Applicative[M]{
View type-bounds.scala
class A
class A2 extends A
class B
trait M[X]
// Upper Type Bound
def upperTypeBound[AA <: A](x: AA): A = x