Skip to content

Instantly share code, notes, and snippets.

View cgcardona's full-sized avatar
💭
🤖

Gabriel Cardona cgcardona

💭
🤖
View GitHub Profile
app.get('/', function(req, res){
res.render('stuff.ejs', {
layout: false,
locals: {
title: 'carlos'
}
})
})
<!doctype html>
<html>
<head>
<title>
<%= title %>
</title>
<link href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz:200,300,400,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/stylesheets/generic.css" type="text/css" />
<link rel="stylesheet" href="/stylesheets/visualize.css" type="text/css" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
var sys = require("sys")
, fs = require("fs")
, path = require("path")
, http = require("http")
, ws = require('../lib/ws');
/*-----------------------------------------------
logging:
-----------------------------------------------*/
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
listening on 8001
==> dyno-2051449.log (crash) <==
listening on 8001
-----> Your application crashed.
Examine the backtrace above this message to debug.
function doSetItem() {
// get the lat, lon, and epoch ready for storage
var lat = $("#lat").text()
var lon = $("#lon").text()
var datestamp = new Date()
var epoch = datestamp.getTime()
// create the JSON for the database
var storageLocationObject = {"lat": lat, "lon": lon}
function doSetItem() {
// get the lat and lon ready assigned to variables
var lat = $("#lat").text()
var lon = $("#lon").text()
var datestamp = new Date()
var epoch = datestamp.getTime()
// create the JSON for the database
var storageLocationObject = {"lat": lat, "lon": lon}
function initialize() {
if (GBrowserIsCompatible()) {
var firstValue = $('#lat').html()
var secondValue = $('#lon').html()
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(firstValue, secondValue), 16);
// Add 10 markers to the map at random locations
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
net:1153
bind(self.fd, arguments[0]);
^
Error: EACCES, Permission denied
at Server.<anonymous> (net:1153:28)
at Server.<anonymous> (vendor/connect/lib/connect/index.js:136:34)
at Server.listen (vendor/express/lib/express/server.js:91:37)
at Object.run (/Users/carloscardona/Desktop/webstuff/CardonaDesigns/bitNirvana/trisomic-propus/lib/app.js:31:7)
at Object.<anonymous> (/Users/carloscardona/Desktop/webstuff/CardonaDesigns/bitNirvana/trisomic-propus/server.js:8:5)
at Module._compile (module:423:23)
@cgcardona
cgcardona / gist:653627
Created October 29, 2010 14:16
Attempting to check if an input field has a value and pass that value to a variable for use else where in the script.
function checkForInput(inputValue) {
// check to see if the form input has a value
if (inputValue === '') {
console.log('no value');
var postFunctionInputValue = inputValue;
} else {
console.log(inputValue);
var postFunctionInputValue = inputValue;
}
console.log(postFunctionInputValue);
function checkForInput(inputValue) {
// check to see if the form input has a value
if (inputValue === '') {
console.log('no value');
var postFunctionInputValue = inputValue;
} else {
console.log(inputValue);
var postFunctionInputValue = inputValue;
}
console.log(postFunctionInputValue);