Skip to content

Instantly share code, notes, and snippets.

View rockymadden's full-sized avatar
:octocat:
Setting status

Rocky Madden rockymadden

:octocat:
Setting status
  • UiPath
  • Pale Blue Dot
View GitHub Profile
@rockymadden
rockymadden / socat-examples.md
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
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 gradle.properties file. Plays nicely with continuous integration tools like Travis-CI.
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 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.
#!/bin/bash
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 (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 February 20, 2018 13:51 — forked from Avaq/combinators.js
Common combinators in JavaScript
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
rockymadden / dev-portal-pitch.md
Last active February 23, 2016 20:57 — forked from greglindahl/dev-portal.md
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:

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]{
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x