Skip to content

Instantly share code, notes, and snippets.

View lenadroid's full-sized avatar

Lena lenadroid

View GitHub Profile
@mhausenblas
mhausenblas / README.md
Last active July 3, 2020 13:30
London MUG 2015-09-24: Kubernetes demo

Demo

  • Create a DCOS CE cluster
  • dcos package install kubernetes takes 1-2 min until UI is available
  • Install kubectl as per the docs
  • Set up K8S: export KUBERNETES_MASTER=$FQHN_OF_DASHBOARD/service/kubernetes/api
    $ dcos package list
 $ dcos marathon app add marathon-gen.json

heather [5:55 PM]

__<

lenadroid [5:55 PM] well... it displays wrong

heather [5:55 PM] yes

lenadroid [5:55 PM]

Getting Cassandra and OpsCenter to run on OSX using Docker

Getting Docker installed

Why not make life easy...? Install Homebrew

The 'brew' package lets you install applications through the commandline, making compiling and setting up new apps a breeze.

Since docker cannot run on osx natively, we will need to build a virtual machine

@lenadroid
lenadroid / Borshtch
Last active December 3, 2018 09:33
How to cook Borshtch
Ingredients:
2 stewpans - one is main = 5 litres, second is for beet
potatoes - 12 items of average size, neither big nor small
beet - 4 items of average size
meat - a piece of pork without fat, size about 10x17x7 santimeters
// Analyze the name
| Expr.Val(vref,_,_),_,_ when valRefEq cenv.g vref cenv.g.nameof_vref ->
let name =
match args.Head with
| Expr.Val(r,_,_) -> r.CompiledName
| x -> "I have no idea what I'm doing:" + (x.ToString())
Some( Expr.Const(Const.String name,m,cenv.g.string_ty),
{ TotalSize=1;
FunctionSize=1
@jessitron
jessitron / haskellyte.md
Created August 1, 2014 16:12
Gershom's Letter to a Young Haskell Enthusiast, condensed. I removed a lot of words, kept the themes, moved a few around a bit.

Letter to a Young Haskell Enthusiast, by Gershom Bazerman.

Condensed from: http://comonad.com/reader/2014/letter-to-a-young-haskell-enthusiast/

The following letter is about tendencies that come with the flush of excitement of learning any new thing. It is written specifically, because if we don't talk specifics, the generalities make no sense. It is a letter full of things I want to remember.

You’ve entered the world of strongly typed functional programming, and it is great. You want to share the great things you’ve learned, and you want to slay all the false statements in the world.

@bigsnarfdude
bigsnarfdude / gist:b2eb1cabfdaf7e62a8fc
Last active March 8, 2021 09:40
ubuntu 14.04 install scala 2.11.7 and sbt 13.9 and java 8 and git
# scala install
wget www.scala-lang.org/files/archive/scala-2.11.7.deb
sudo dpkg -i scala-2.11.7.deb
# sbt installation
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get update
sudo apt-get install sbt
@isaacabraham
isaacabraham / 1 - StorageQueueMailboxProcessor.fs
Last active August 15, 2020 09:36
Demonstrates how to use F# mailbox processors in conjunction with Azure Storage Queues.
/// Code to bind mailbox processors to azure storage queues.
module AzureMailboxProcessor
open System
module private Async =
let AwaitTaskEmpty = Async.AwaitIAsyncResult >> Async.Ignore
module private Option =
let fromNullable (nullable:Nullable<_>) = if nullable.HasValue then Some nullable.Value else None
let toNullable = function
@alissapajer
alissapajer / gist:50c912d739346c1f00dd
Last active April 1, 2016 06:34
Contravariant and Covariant Functors and Variance of Types over their Type Parameters
/**
* Exercises explaining covariant and contravariant functors.
*
* Additionally exercises explaining variance of types over their type parameters.
*
* Implement the `???` functions. Are all implementable?
*/
trait Functors {
/**
@freeman-lab
freeman-lab / StreamingKMeans.scala
Last active February 26, 2019 07:13
Spark Streaming + MLLib integration examples
package thunder.streaming
import org.apache.spark.{SparkConf, Logging}
import org.apache.spark.rdd.RDD
import org.apache.spark.SparkContext._
import org.apache.spark.streaming._
import org.apache.spark.streaming.dstream.DStream
import org.apache.spark.mllib.clustering.KMeansModel
import scala.util.Random.nextDouble