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
| /** | |
| * ## Merging mixin views in backbone.js ## | |
| * | |
| * really just more a test for tumblr gistr | |
| */ | |
| /** | |
| * Merge the mixin (a Backbone.View) into another Backbone.View. Automatically merge events, defaults, and call the parent initializer. | |
| **/ | |
| function mergeMixin(view, mixin) { |
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
| Steps: | |
| 0. Checkout your git repo from the server (I use /var/www/carbonite) | |
| 1. Upload both of these files to the same directory on your server | |
| 2. chmod +x restart_node.sh | |
| 3. nohup node github_post_commit.js 2>&1 >> github_post_commit.log & | |
| 4. In the github admin for your repo, set a post commit hook to the url http://<your host>:8080/ | |
| 5. Make a commit to your repo | |
| 6. Point a browser at http://<your host>:8080/ and you should see the commit |
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
| #!/bin/bash | |
| ## Node.js App Launcher | |
| ## Usage: ./nodedaemon.sh /home/apps/projectname/app.js | |
| ## Baesed on: http://pastebin.com/wNJNkbjg | |
| # name=`basename $1` # For when/if we want to use scriptname | |
| name=`dirname $1 | xargs -0 basename` # When/if we want to use last folder name as project name | |
| cd `dirname $1` |
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
| #!/bin/sh | |
| # ------------------------------------------------------------------------------ | |
| # SOME INFOS : fairly standard (debian) init script. | |
| # Note that node doesn't create a PID file (hence --make-pidfile) | |
| # has to be run in the background (hence --background) | |
| # and NOT as root (hence --chuid) | |
| # | |
| # MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
| # INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
| # INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
NewerOlder