1.Simply add the deploy.sh to your application folder
2.Start your service
deploy.sh start myApp.js
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf to /usr/local/etc/nginx/default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-availablehomebrew.mxcl.nginx.plist to /Library/LaunchDaemons/| <?php | |
| // Force update our username (user_login) | |
| global $wpdb; | |
| $tablename = $wpdb->prefix . "users"; | |
| // method 1 | |
| //$sql = $wpdb->prepare("UPDATE %s SET user_login=%s WHERE ID=%d", $tablename, $user_email, $user_id); | |
| //$wpdb->query($sql); | |
| module = angular.module 'FacebookPluginDirectives', [] | |
| createDirective = (name) -> | |
| module.directive name, -> | |
| restrict: 'C' | |
| link: (scope, element, attributes) -> | |
| FB?.XFBML.parse(element.parent()[0]) | |
| createDirective pluginName for pluginName in ['fbActivity', 'fbComments', 'fbFacepile', 'fbLike', 'fbLikeBox', 'fbLiveStream', 'fbLoginButton', 'fbName', 'fbProfilePic', 'fbRecommendations'] |
| var buggyAndroid = parseInt((/android (\d+)/.exec(window.navigator.userAgent.toLowerCase()) || [])[1], 10) < 4; | |
| if (!history.pushState || buggyAndroid) { | |
| if (window.location.hash) { | |
| if(window.location.pathname !== '/') window.location.replace('/#!' + window.location.hash.substr(2)); //Hash and a path, just keep the hash (redirect) | |
| } else { | |
| window.location.replace('/#!' + window.location.pathname); //No hash, take path | |
| } | |
| } | |
| //And then in app.config: |
| #!/bin/bash | |
| # | |
| # initd-example Node init.d | |
| # | |
| # chkconfig: 345 80 20 | |
| # description: Node init.d example | |
| # processname: node | |
| # pidfile: /var/run/initd-example.pid | |
| # logfile: /var/log/initd-example.log | |
| # |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
Handlebars.js is a template framework for Javascript environments. It allows the construction of HTML elements using HTML and expressions wrapped in {{ }}
One of the conditional block helpers Handlebars offers is the {{#if}}.
For example:
<div class="entry">