Skip to content

Instantly share code, notes, and snippets.

View slpsys's full-sized avatar
💭
💯

Marc Bollinger slpsys

💭
💯
View GitHub Profile
@slpsys
slpsys / party.sh
Last active July 28, 2017 00:34
On a Mac, prerequisite is `brew install brightness`
#!/bin/bash
i=0
step=0.1
while true
do
b=$(echo "scale=3;(s($i)+1)*0.5" | bc -l)
brightness $b
@slpsys
slpsys / gist:198704b444fce38cff88dea6b9f0dbc7
Created February 25, 2017 20:21
Broadside config for load-balanced service, with preconfigured ELB named 'redshift-console-elb'
Broadside.configure do |config|
config.application = 'redshift_console'
config.default_docker_image = # image location
config.aws.ecs_default_cluster = # cluster name
config.targets = {
production_web: {
scale: 1,
env_file: '.env.production',
service_config: {
role: 'ecsServiceRole',
@slpsys
slpsys / RuntimeTypes.scala
Created July 13, 2016 17:10
Wrangling the type system _and_ getting runtime type info
import scala.reflect.runtime.{universe => ru}
// Trivial class hierarchy
class NotionalObject
class Car extends NotionalObject
class Dog extends NotionalObject
// Not part of the hierarchy
class AbstractExpressionism
(ns utils)
(def ^:private baphomet
[" ._ ,"
" (`).. ,.-')"
" (',.)-.. ,.-(..`)"
" (,.' ,.)-.. ,.-(. `.. )"
" (,.' ..' .)-.. ,.-( `.. `.. )"
" (,.' ,.' ..')-. ,.-( `. `.. `.. )"
" (,.' ,.' ,.' )-.-(' `. `.. `.. )"
(ns generativity
(:use [cascalog api]))
(defn one_of [seq] (vec (map vector seq)))
(deffilterop forbid
([var comparator val]
(not (comparator var val)))
([var op val comparator comparee]
(not (comparator (op var val) comparee))))

Essential Bruce Springsteen All albums and tracks appear in chronological order.

  1. Greetings from Asbury Park
  • lolno
  1. The Wild, The Innocent, & The E Street Shuffle
  • Rosalita (Come out Tonight)
  • Incident on 57th Street
@slpsys
slpsys / jon_skeet_exercise.cs
Created April 9, 2013 21:26
Bending the language to my will in the name of science, with presumably horrific consequences.
using System;
using var = TestBed.MyClass;
namespace TestBed
{
public class MyClass
{
public static implicit operator MyClass(int me)
{
return null;
@slpsys
slpsys / lulz.bash
Created February 13, 2013 22:01
lulz
#download monit source
wget $MONIT_SOURCE_URL -O /root/download/monit.tar.gz
if [ ! -e /root/download/redis.tar.gz ]
then
wget $MONIT_SOURCE_URL -O /root/download/monit.tar.gz
fi
@slpsys
slpsys / c_sharp_snippet.cs
Created February 12, 2013 01:53
Real talk, real code.
}
}
}
}
}
}
}
}
@slpsys
slpsys / holy_cow.js
Created January 30, 2013 23:56
holy_cow.js sums it up.
if (typeof Xignite == "undefined" || !Xignite) { var Xignite = {}; };
Xignite.license = '';
Xignite.XigniteQuotes = {};
Xignite.XigniteQuotes.GetQuickQuotes = function(symbol, callback)
{ var url = "http://www.xignite.com/xQuotes.json/GetQuickQuotes?Symbol=" + symbol + "&_callback=?"; $.getJSON(url, callback);}
Xignite.XigniteQuotes.GetSingleQuote = function(symbol, callback)
{ var url = "http://www.xignite.com/xQuotes.json/GetSingleQuote?Symbol=" + symbol + "&_callback=?"; $.getJSON(url, callback);}
Xignite.XigniteQuotes.GetQuotes = function(symbol, callback)