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
define(['marionette', 'underscore'], function (Marionette, _) { | |
return Marionette.ItemView.extend({ | |
tagName: 'li', | |
className: 'gallery-item-view', | |
template: _.template('<a href="#" data-link="<%= link %>"><img src="<%= src %>" alt="<%= alt %>" /></a>'), | |
events: { | |
'click a': 'onClick' | |
}, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
} |
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
function shuffle(o){ | |
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); | |
return o; | |
} |
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
Vagrant.configure("2") do |config| | |
config.vm.box = 'precise32' | |
config.vm.box_url = 'http://files.vagrantup.com/precise32.box' | |
config.vm.network :private_network, ip: "10.11.12.13" | |
config.vm.synced_folder "./", "/vagrant", :nfs => true | |
config.vm.provision :puppet do |puppet| |
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 color = '#'+Math.floor(Math.random()*16777215).toString(16); |
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
function extend(Child, Parent) { | |
Child.prototype = (function () { function F() {}; F.prototype = Parent.prototype; return new F; })(); | |
Child.prototype.constructor = Child; | |
Child.parent = Parent.prototype; | |
return Child.prototype; | |
}; | |
//namespace | |
var world = {species:{animals:{}}}; |
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 Developer | |
attr_accessor :version, :url, :name, :address, :tel, :email, :twitter, :knowledge | |
def initialize(name, version) | |
@name = name | |
@version = version | |
end | |
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
MM_DIR="/Library/Application Support/Macromedia" | |
LG_DIR="${HOME}/Library/Preferences/Macromedia/Flash Player/Logs" | |
sudo mkdir -vp $MM_DIR | |
# create config file | |
sudo touch "${MM_DIR}/mm.cfg" | |
# Write mm config | |
sudo echo 'ErrorReportingEnable=1\nTraceOutputFileEnable=1' | sudo tee "${MM_DIR}/mm.cfg" |
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
package com.singuerinc.labs.utils.validators { | |
/** | |
* @author blog.singuerinc.com | |
*/ | |
public class SpainPostalCodeValidator { | |
public var stateNames:Array = ['Alava/Araba', 'Albacete', 'Alicante', 'Almería', 'Avila', 'Badajoz', 'Islas Baleares', 'Barcelona', 'Burgos', 'Cáceres', 'Cádiz', 'Castellón', 'Ciudad Real', 'Córdoba', 'A Coruña/La Coruña', 'Cuenca', 'Gerona/Girona', 'Granada', 'Guadalajara', 'Gipuzkoa/Guipuzcoa', 'Huelva', 'Huesca', 'Jaen', 'León', 'Lérida/Lleida', 'La Rioja', 'Lugo', 'Madrid', 'Málaga', 'Murcia', 'Navarra', 'Orense/Ourense', 'Asturias', 'Palencia', 'Las Palmas', 'Pontevedra', 'Salamanca', 'S.C.Tenerife', 'Cantabria', 'Segovia', 'Sevilla', 'Soria', 'Tarragona', 'Teruel', 'Toledo', 'Valencia', 'Valladolid', 'Bizkaia/Vizcaya', 'Zamora', 'Zaragoza', 'Ceuta', 'Melilla']; | |
private var _stateName:String; | |
private var _stateCode:String; |
NewerOlder