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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Web.Mvc; | |
namespace NerdDinner.Models | |
{ | |
public partial class Dinner | |
{ |
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
from bottle import route, run, view | |
@route('/') | |
@route('/index.html') | |
def index(): | |
return "<a href='/hello'>Go to Hello World page</a>" | |
@route('/hello') | |
@route('/hello/:name') | |
@view('index') |
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
{u'noite': [[u'MACRO_CITY:1', u'sao_paulo'], [u'MACRO_CITY:39', u'belo_horizonte'], [u'MACRO_CITY:41', u'porto_alegre'], [u'MACRO_CITY:36', u'rio_de_janeiro']], u'shows': [[u'MACRO_CITY:36', u'rio_de_janeiro'], [u'MACRO_CITY:1', u'sao_paulo'], [u'MACRO_CITY:41', u'porto_alegre'], [u'MACRO_CITY:39', u'belo_horizonte']], u'turismo': [[u'MACRO_CITY:1', u'sao_paulo'], [u'MACRO_CITY:39', u'belo_horizonte'], [u'MACRO_CITY:41', u'porto_alegre'], [u'MACRO_CITY:36', u'rio_de_janeiro']], u'cinema': [[u'MACRO_CITY:39', u'belo_horizonte'], [u'MACRO_CITY:41', u'porto_alegre'], [u'MACRO_CITY:36', u'rio_de_janeiro'], [u'MACRO_CITY:1', u'sao_paulo']]} |
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
var allJs = document.getElementsByTagName('script'), | |
lastJs = allJs[allJs.length-1], | |
logoJs = document.createElement('script'); | |
logoJs.src = 'http://qa2.obaoba.com.br/sites/obaoba.com.br/themes/obaoba2010/js/troca-logo.js'; | |
lastJs.parentNode.appendChild(logoJs); |
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
var cursor = db.places.find(); | |
while (cursor.hasNext()) { | |
var x = cursor.next(); | |
x['source']['url'].replace('aaa', 'bbb'); // is this correct? | |
db.foo.update({_id : x._id}, x); | |
} |
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
petto@mac ~/dev/bento/packer (master●)$ packer build --only=parallels-iso debian-7.6-amd64.json [ruby-2.1.1] | |
parallels-iso output will be in this color. | |
==> parallels-iso: Downloading or copying ISO | |
parallels-iso: Downloading or copying: http://cdimage.debian.org/debian-cd/7.6.0/amd64/iso-cd/debian-7.6.0-amd64-CD-1.iso | |
==> parallels-iso: Starting HTTP server on port 8081 | |
==> parallels-iso: Creating virtual machine... | |
==> parallels-iso: Executing: prlctl [create packer-debian-7.6-amd64 --distribution debian --dst packer-debian-7.6-amd64-parallels --vmtype vm] | |
==> parallels-iso: Executing: prlctl [set packer-debian-7.6-amd64 --cpus 1] | |
==> parallels-iso: Executing: prlctl [set packer-debian-7.6-amd64 --memsize 512] |
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 MockPromise { | |
then(fn) { | |
this.thenFn = fn | |
return this | |
} | |
catch(fn) { | |
this.catchFn = fn | |
return this | |
} |
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
browser | |
.setValue('.input-text', email) | |
.setValue('input.input-text[type=password]', password) | |
.click('.btn-success') | |
.pause(200) | |
.assert.urlEquals(url) | |
.end() |
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
browser | |
.setValue('input[placeholder=E-mail]', email) | |
.setValue('input[placeholder=Password]', password) | |
.useXpath() | |
.click("//*[text()='Login']") | |
.pause(200) | |
.expect.element("//*[text()='John Doe']").to.be.present |
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
<html> | |
<head> | |
<script> | |
function myFunc() { | |
var email = document.getElementById("email").value | |
var e = document.getElementById("select") | |
var selectedOption = e.options[e.selectedIndex].value | |
var checkBox = document.getElementById('defaultCheck1').checked | |
if (email == 'foo@bar' && checkBox && selectedOption == "audi") { |
OlderNewer