Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Setting status

Rocky Madden rockymadden

:octocat:
Setting status
View GitHub Profile
View socat-examples.md

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

View present.rockymadden.com.md

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


#Gist => Deck


@rockymadden
rockymadden / build.gradle
Last active Jun 27, 2018
Deploy a Gradle Scala project to Maven Central, or any Maven repository for that matter, based upon the presence of variables in your gradle.properties 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') &&
hasProperty('mavenRepositoryPassword')
if (isMavenDeployable) {
signing {
@rockymadden
rockymadden / scala.sh
Last active May 31, 2018
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.
View scala.sh
#!/bin/bash
dir="`dirname \"$0\"`"
dir="`( cd \"$dir\" && pwd )`"
cp=`echo $dir/*.jar|sed 's/ /:/g'`
exec scala -classpath "$cp" -savecompiled "$0" "$@"
!#
View keybase.md

Keybase proof

I hereby claim:

  • I am rockymadden on github.
  • I am rockymadden (https://keybase.io/rockymadden) on keybase.
  • I have a public key ASAeoRru5wuha4ttFt1zbI5_qgGIqmPCy4VHntQvOCUnOgo

To claim this, I am signing this object:

@rockymadden
rockymadden / combinators.js
Created Feb 20, 2018 — 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)));
View link.rockymadden.run.json
@rockymadden
rockymadden / dev-portal-pitch.md
Last active Feb 23, 2016 — forked from greglindahl/dev-portal.md
Developer Portal pitch
View dev-portal-pitch.md

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
You can’t perform that action at this time.