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 / vimtutor
Created August 21, 2011 17:49
Installing vimtutor
[endymiion@Hyperion ~]$ sudo yum install vim-enhanced
[endymiion@Hyperion ~]$ vimtutor
@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 / 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 / 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 / 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:2690652
Created May 13, 2012 22:55
pomodori.js - describing a Task should exist
describe 'Task', ->
it "should exist", ->
expect(PomoJS.Models.Task).toBeDefined()
@msanroman
msanroman / gist:2690674
Created May 13, 2012 22:59
pomodori.js - creating a Models namespace in our application and a Task class
#app.coffee
window.PomoJS = {
Models: {}
}
#Task.coffee
class PomoJS.Models.Task