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 () { | |
var a = 'not foo again'; | |
var foo = function (b) { | |
// do something funky with a and b | |
}; | |
window.myPlugin = foo; | |
}()); |
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 ($) { | |
var a = 'just-a-classname'; | |
$.fn.myPlugin = function () { | |
$(this).addClass(a); | |
}; | |
}(jQuery)); |
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
jQuery('a').myPlugin(); |
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
$(document).ready(function() { | |
// Declare variables to hold twitter API url and user name | |
var twitter_api_url = 'http://search.twitter.com/search.json'; | |
var twitter_user = 'lupomontero'; | |
// Enable caching | |
$.ajaxSetup({ cache: true }); | |
// Send JSON request | |
// The returned JSON object will have a property called "results" where we find |
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
<div id="tweet_container"></div> |
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
#!/usr/bin/env node | |
var express = require('express'); | |
var port = process.argv[2] || 8080; | |
var ip = process.argv[3] || '127.0.0.1'; | |
var app = express(); | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'hbs'); | |
app.use(express.static(__dirname + '/public')); |
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 | |
# The logic to stop your application should be put in this script. | |
kill `ps -ef | grep app.js | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1 | |
exit 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
#!/bin/bash | |
# The logic to start up your application should be put in this | |
# script. The application will work only if it binds to | |
# $OPENSHIFT_INTERNAL_IP:8080 | |
HOME=$OPENSHIFT_DATA_DIR nohup $OPENSHIFT_DATA_DIR/nave/nave.sh use 0.10.33 \ | |
$OPENSHIFT_REPO_DIR'app.js' $OPENSHIFT_INTERNAL_PORT $OPENSHIFT_INTERNAL_IP \ | |
> $OPENSHIFT_LOG_DIR/app.log 2>&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/bash | |
# This is a simple script and will be executed on your CI system if | |
# available. Otherwise it will execute while your application is stopped | |
# before the build step. This script gets executed directly, so it | |
# could be python, php, ruby, etc. | |
NAVE=$OPENSHIFT_DATA_DIR/nave/nave.sh | |
# If `nave` doesn't exist we get it from GitHub. | |
if [ ! -f $NAVE ]; then |
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
Marker - 30 Oct 2013 13:56:59 | |
[error] [<0.110.0>] Uncaught error in HTTP request: {error,undef} | |
[info] [<0.110.0>] Stacktrace: [{couch_httpd_auth, | |
proxy_authentication_handler, | |
[{httpd, | |
{mochiweb_request, | |
[#Port<0.2980>,'GET',"/_utils/", | |
{1,1}, | |
{8, | |
{"host", |