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
| import os | |
| input_path = 'application/templates' | |
| output_path = 'application/static/js/templates' | |
| os.system('mkdir %s' % output_path) | |
| dir_list = os.listdir(input_path) | |
| for file_name in dir_list: | |
| if file_name.endswith('.handlebars'): | |
| cmd = 'handlebars %s/%s -f %s/%s' % (input_path, file_name, output_path, file_name.replace('handlebars', 'js')) |
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
| These arent always the causes, just in the cases I saw them. | |
| Unexpected { | |
| Cause: mismatched curly braces, count your braces | |
| Unexpected token . | |
| Cause: var buttonDiv.bla = 4 | |
| SyntaxError: Unexpected string | |
| Cause: var bla = bla + ' hi ' ' you' |
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
| diff --git a/src/brackets.js b/src/brackets.js | |
| index 39e30b2..cb20367 100644 | |
| --- a/src/brackets.js | |
| +++ b/src/brackets.js | |
| @@ -199,7 +199,8 @@ define(function (require, exports, module) { | |
| //{"Ctrl-X": Commands.EDIT_CUT}, | |
| //{"Ctrl-C": Commands.EDIT_COPY}, | |
| //{"Ctrl-V": Commands.EDIT_PASTE}, | |
| - | |
| + {"Ctrl-I": Commands.SHOW_OTHER_STUFF}, |
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
| /* | |
| * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a | |
| * copy of this software and associated documentation files (the "Software"), | |
| * to deal in the Software without restriction, including without limitation | |
| * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| * and/or sell copies of the Software, and to permit persons to whom the | |
| * Software is furnished to do so, subject to the following conditions: | |
| * |
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
| /* | |
| Licensed to the Apache Software Foundation (ASF) under one | |
| or more contributor license agreements. See the NOTICE file | |
| distributed with this work for additional information | |
| regarding copyright ownership. The ASF licenses this file | |
| to you under the Apache License, Version 2.0 (the | |
| "License"); you may not use this file except in compliance | |
| with the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <base target="_blank"> | |
| <title>eatdifferent</title> | |
| <script> | |
| var ED = ED || {}; | |
| ED.VERSION = '36' |
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
| /*global module:false*/ | |
| module.exports = function(grunt) { | |
| var CSS_DIR = 'src/css/'; | |
| var JS_DIR = 'src/js/'; | |
| var BUILD_DIR = '../build/'; | |
| // Project configuration. | |
| grunt.initConfig({ |
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
| // Logging | |
| var allLogs = []; | |
| function log(something) { | |
| // Store | |
| var storedSomething = something; | |
| if (window.JSON) { | |
| storedSomething = JSON.stringify(something); | |
| } | |
| storedSomething = 'LOG @ ' + new Date().toString() + ': ' + truncateText(storedSomething, 200); | |
| allLogs.push(storedSomething); |
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 getPhoto(mealId, sourceType, saveOnSuccess) { | |
| var $mealDiv = $('#log-meal-' + mealId); | |
| var $mealImg = $mealDiv.find('.log-meal-photo-button img'); | |
| var $quickpicStatus = $('#mobile-quickpic-link span'); | |
| function resetQuickPicStatus() { | |
| $quickpicStatus.html('').addClass('icon-camera'); | |
| } | |
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
| // Zepto.js | |
| // (c) 2010, 2011 Thomas Fuchs | |
| // Zepto.js may be freely distributed under the MIT license. | |
| (function(undefined){ | |
| if (String.prototype.trim === undefined) // fix for iOS 3.2 | |
| String.prototype.trim = function(){ return this.replace(/^\s+/, '').replace(/\s+$/, '') }; | |
| // For iOS 3.x | |
| // from https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce |