This file contains hidden or 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
function EasterEgg(egg, cb) { | |
this.egg = egg; | |
this.cb = cb; | |
this.start(); | |
} | |
EasterEgg.prototype.start = function() { | |
var egg = this.egg; | |
var buffer = []; | |
var cb = this.cb; |
This file contains hidden or 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
describe(['class_to_be_tested'], function(my_class){ | |
// Jasmine code | |
}); |
This file contains hidden or 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
// helpers | |
function areEnemies(robot, sighted) { | |
var sightedIsChild = (robot.id == sighted.parentId); | |
var sightedIsParent = (robot.parentId == sighted.id); | |
return !(sightedIsChild || sightedIsParent); | |
}; | |
function baseStep(robot) { |
This file contains hidden or 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
<div class="field"> | |
<% if(field.toolTip !== undefined) { %> | |
<%= _.partial('tooltip', {tooltip: {content: field.toolTip}}) %> | |
<% } %> | |
</div> |
This file contains hidden or 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
_.declarePartial('tooltip', '<div class="toolTipWrapper"><div class="trigger"><i></i></div><div class="content"><%= tooltip.content %></div></div>'); |
This file contains hidden or 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
/** | |
* Allow underscore use of partials | |
*/ | |
var underscorePartials = (function(){ | |
var partialCache = {}; | |
var mixin = { | |
declarePartial: function(name, template) { | |
partialCache[name] = _.template(template); | |
}, |
This file contains hidden or 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
#!/bin/bash | |
killall gvfs-gphoto2-volume-monitor | |
killall gvfsd-gphoto2 | |
cd /home/seb/Desktop/tltest | |
echo "taking a pic" >> counter | |
/usr/bin/gphoto2 --capture-image-and-download --interval 600 --frames 20 |
This file contains hidden or 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
<?php | |
namespace Acme\MessageBundle\FormType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
use Symfony\Component\Security\Core\SecurityContext; | |
use Doctrine\ODM\MongoDB\DocumentRepository; | |
class FriendMessageWithAttachmentFormType extends AbstractType |
This file contains hidden or 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
<div id="first-tab"> | |
<form action="{{ path('mashup_user_profile_update') }}" method="post" {{ form_enctype(form) }} class="form-horizontal span6"> | |
{{ form_row(form.first_name) }} | |
{{form_rest(form)}} | |
<div class="form-actions"> | |
<button type="submit" class="btn btn-primary">Update my profile</button> | |
</div> | |
</form> |
This file contains hidden or 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
<?php | |
namespace Acme\MessageBundle\FormType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
use Symfony\Component\Security\Core\SecurityContext; | |
use Doctrine\ODM\MongoDB\DocumentRepository; | |
class FriendMessageFormType extends AbstractType |