This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#..... | |
# configuration below *cannot* be inside .bashrc | |
. ~/public/github/dotfiles/bashrc.my.bash_zsh_support | |
#..... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SeenTutorialPersistence | |
constructor: (@usecase, @serverSide) -> | |
execute: => | |
After(@usecase, 'readyToStart', | |
=> @serverSide.storePlayerIsReadyToStart()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WebGui | |
initialize: => | |
@mainScreen = new Screen('template-game-main') | |
showWelcome: => | |
@mainScreen.show() | |
@mainScreen.find('.game-start-button').click @startBtnClicked | |
startBtnClicked: => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WebGlue | |
constructor: (@usecase, @gui, @soundAPI)-> | |
@memory = @usecase.memoryGame | |
applyMemoryGameGlue: => | |
Before(@usecase, 'startMemoryGame', | |
=> @gui.showWelcome(@memory.timeLimit)) | |
After(@memory, 'readyToStart', @gui.showStart) | |
After(@memory, 'teachHowToPlay', @gui.showTutorial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
readyToStart: => #empty. aop here.. | |
teachHowToPlay: => #empty. aop here.. | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
playerFinishedTutorial: => | |
@playerCompletedTutorial = true | |
@readyToStart() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MemoryGameUseCase | |
constructor: -> | |
@games = [] | |
@timeLimit = 60 | |
playerRequestsStart: => | |
if @knowsHowToPlay() | |
@start() | |
else | |
@teachHowToPlay() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @match https://yourwebsite.com/xyz | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/sugar/1.3/sugar.min.js | |
// ==/UserScript== | |
alert('Hello, I got jQuery included and sugarJs too'); | |
var runEverySecond = function(){ | |
$('p').find('img').attr('width', '0px'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.assets.compress = true | |
require 'uglifier' | |
config.assets.js_compressor = Uglifier.new( | |
{:beautify=>true, | |
:beautify_options => | |
{:indent_level => 2, | |
:indent_start => 0, | |
:space_colon => false} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I blogged about our usage of "Swappable Mixins in CoffeeScript". Thanks! | |
# | |
# http://aspectized.com/2012/05/mixins-in-coffeescript/ | |
# | |
# we used Underscore to help with `this` binding. This way role&base class can | |
# modify their data | |
# | |
# ..... |
NewerOlder