Skip to content

Instantly share code, notes, and snippets.

View msanroman's full-sized avatar
📈
1% better every day

Mike San Román msanroman

📈
1% better every day
View GitHub Profile
@msanroman
msanroman / links-popups.js
Created May 21, 2015 11:45
Vincular click con mostrar un popup... dentro de otro popup
@msanroman
msanroman / gist:1462252
Created December 11, 2011 19:29
query_concat
<?php
private function query_concat($key, $value, $query){
$query.'AND {$key} = ';
if($value != '') $query = $query.'"'.$value.'"';
else $query = $query.'NULL ';
return $query;
}
?>
@msanroman
msanroman / gist:1488187
Created December 16, 2011 21:57
Transient state for notify-send
--hint=int:transient:1
@msanroman
msanroman / gist:1924717
Created February 27, 2012 15:35
Init behat
php app/console -e=test behat --init @Bundle
@msanroman
msanroman / gist:1924736
Created February 27, 2012 15:37
Execute behat in test environment
php app/console -e=test behat
@msanroman
msanroman / logo-seccion.feature
Created February 27, 2012 15:34
Sections' logo clickable
Feature: Sections' logo clickable
In order go quickly to the section's index page
As a Playground reader
I want to click on the section's logo
Scenario Outline: Section's logo should be clickable
Given I am on "<currentUrl>"
When I click on the "<section>" logo
Then I should be on "<targetUrl>"
@msanroman
msanroman / FeatureContext.php
Created February 27, 2012 15:35
FeatureContext
<?php
namespace Runroom\BaseBundle\Features\Context;
use Behat\BehatBundle\Context\BehatContext,
Behat\BehatBundle\Context\MinkContext;
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
@msanroman
msanroman / TaskSpec.coffee
Created May 11, 2012 08:59
TodoList.Models.Task jasmine description in CoffeeScript
describe 'TodoList.Models.Task', ->
beforeEach ->
@task = new TodoList.Models.Task
it "should exist", ->
expect(TodoList.Models.Task).toBeDefined()
it "should be instantiable", ->
expect(@task).not.toBeNull()
@msanroman
msanroman / gist:2690702
Created May 13, 2012 23:05
pomodori.js - defining default values for our tasks' attributes
class PomoJS.Models.Task extends Backbone.Model
defaults: {
name: '',
completed: false,
estimation: 0
}
@msanroman
msanroman / gist:2690794
Created May 13, 2012 23:37
pomodori.js - tasks with url logic for creation and update
class PomoJS.Models.Task extends Backbone.Model
url: ->
url = "/tasks"
url += "/#{@.getId()}" unless @.isNew()
return url
defaults: {
name: '',
completed: false,