Skip to content

Instantly share code, notes, and snippets.

View jearle's full-sized avatar

Jesse Earle jearle

View GitHub Profile
fetchJson(path, function(jsonData) {
var images = jsonData.images;
fetchMesh(jsonData.meshPaths, function(meshes){
for(var i = 0 ; i < meshes.length - 1 ; i++){
meshes[i].applyMesh(function(mesh){
obj.mesh = mesh;
});
}
});
Page = model
name: 'Page'
fields:
name: String
layout: String
content: String
references: [ {
type: mongoose.Types.ObjectId
ref: 'Reference'
Bird = new Class(function(){
property('name', String)
.get(function(){
this._name;
})
.set(function(name){
this._name = name;
});
public('name', function(){
var MyPersonClass = (function(){
// This function is always fired when you use the 'new' key word.
//
// Example:
// var myPersonInstance = new MyPersonClass('jesse', 24);
//
// The 'this' pointer points to the INSTANCE of MyPersonClass, NOT
// to MyPersonClass when you use the 'new' keyword.
//
module.exports = {
name: 'shopbeamAttributesDropdown',
directive: ['$filter', '$compile', function($filter, $compile){
return {
restrict: 'A',
scope: {
name: '@',
model: '=',
modelDisplayNameProperty: '@',
module.exports = {
name: 'shopbeamAttributesBar',
directive: ['$filter', '$compile', function($filter, $compile){
return {
restrict: 'A',
scope: {
dropdownModelSelected: '='
},
templateUrl: '/partials/attributes-bar',
.row-fluid
.span12
ul(shopbeam-attributes-bar, dropdown-model-selected="addTag")
li(shopbeam-attributes-dropdown,
name="Categories",
model="categories",
model-display-name-property="name",
tag-type="categories")
li(shopbeam-attributes-dropdown,
module.exports = {
name: 'shopbeamColorSelector',
directive: ['Cloudinary', function(Cloudinary){
return {
restrict: 'A',
scope: {
product: '='
},
templateUrl: '/partials/dashboard/color-selector',
import re
status = "empty"
tries = 2
while status == "fail" or "empty":
print "Enter your passwrd:"
password = raw_input()
print "You entered " + password + "."
matchobj1 = re.search('[a-z]', password)
matchobj2 = re.search('[A-Z]', password)
import re
class NewPassword(object):
current_try_count = 0
max_try_count = 3
fail_status = True
exit_text = '\n\tYou are out of tries!'
valid_password_text = '\n\t {} is a valid password.'