Skip to content

Instantly share code, notes, and snippets.

Alexandros Marinos alexandrosm

Block or report user

Report or block alexandrosm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alexandrosm / gist:8751262
Last active Aug 29, 2015
Card guessing strategy
View gist:8751262
During a recent flight with Eva, we were playing with cards to
relieve the boredom. Such boredom that we ended up guessing "red or black"
off a deck of cards, trying to see how many we could guess right in
a pack of 52. Without state, you expect to come in somewhere around 26.
Naturally I started thinking what a better strategy would be, so I figured
remembering how many red and black cards have come out so far would help
make better choices. So the strategy was simple: choose what has come out
alexandrosm / gist:8255011
Last active Jan 2, 2016
A lazy bacon.js recursive stream engine
View gist:8255011
define ['angular', 'bacon', 'lodash'], (angular, bacon, _) ->
($parse, ngUrlBind) ->
# StreamEngine is a generic stream generation and caching
# library that is dependent on bacon.js only. It takes
# as argument a streamSource function which takes the
# StreamEngine instance, source name, and source params
# as arguments and returns a bacon stream.
class StreamEngine
constructor: (streamSource) ->
@streamSource = streamSource.bind(null, this)
alexandrosm / gist:8204709
Created Jan 1, 2014
My solution to the alphabet code golf challenge.
View gist:8204709
match = [
'aerate aerate arrest errant serene tanner testes'
'aerate assent assent assert rester retest tenant'
'aerate assert rearer renter resent serene teaser'
'aerate easter easter tenant tester testes tsetse'
'arrest arrest easter entree errant resent senate'
'assent assess assets estate resent staree teaser'
'assert astern renter rerent resent staree street'
'assert enseat entree errata rennet teaser tsetse'
'assert rennet renter reseat rester serene tenant'
You can’t perform that action at this time.