Skip to content

Instantly share code, notes, and snippets.

View alduro's full-sized avatar

Aldo Nievas alduro

  • Buenos Aires - Argentina
  • 05:26 (UTC -03:00)
View GitHub Profile
<h3>Sign up</h3>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<h2>Registration</h2>
<% if alert %>
<div class="generalMessage">
<ul>
<li><%= alert %></li>
</ul>
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
@alduro
alduro / echo $PATH
Created April 11, 2011 23:43
satio at no.de
/home/node/local/bin:/home/node/local/nodejs/bin:/opt/nodejs/bin:/usr/nodejs/bin:/opt/local/bin:/opt/local/sbin:/usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin
@alduro
alduro / satio.no.de
Created April 12, 2011 01:07
ssh access
aldo@macbook ~/.ssh > ssh -vvv node@64.30.137.237
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /Users/aldo/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 64.30.137.237 [64.30.137.237] port 22.
debug1: Connection established.
debug1: identity file /Users/aldo/.ssh/identity type -1
debug3: Not a RSA1 key file /Users/aldo/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
@alduro
alduro / how to install couchdb in no.de
Created April 12, 2011 01:52
how to install couchdb in no.de
<marsell> Anyway, since I might be gone for a jog later, these are the steps I used to run CouchDB:
[21:43] <marsell> pkgin install erlang-14.1.1 couchdb-1.0.1nb1
[21:43] <marsell> svccfg import /opt/local/share/smf/manifest/epmd.xml ; svccfg import /opt/local/share/smf/manifest/couchdb.xml
[21:44] <marsell> svcadm enable epmd couchdb
[21:44] <marsell> After that couchdb was running.
[21:44] <marsell> You can check with a "svcs -a | ack couch", which returns a line saying:
[21:44] <marsell> online 0:43:57 svc:/application/couchdb:default
[21:45] <marsell> The "online" bit is crucial. If it's not online, give me a ping later.
class Attendee < Ohm::Model
attribute :email
attribute :hash
attribute :group
attribute :prefix
attribute :ami_instance
attribute :confirmed
index :hash
index :confirmed
end
class Attendee < Ohm::Model
attribute :email
attribute :hash
attribute :group
attribute :prefix
attribute :ami_instance
attribute :confirmed
attribute :expires_on
attribute :expires_at
index :hash
##
# Once email is confirmed
##
terminate_on = (Time.parse( params['expires_on'] + ' ' + params['expires_at']).gmtime + Time.zone_offset("PST")).strftime('%Y-%m-%d %H:%M')
attendee = Attendee.create :email => email,
:hash => hash_code,
:group => args_to_save[:groups],
:prefix => args_to_save[:prefix],
:ami_instance => args_to_save[:ami_instance],
$.ajax({
url: '/ajax_nyc_events',
dataType: 'json',
success: function(doc) {
$.each(doc, function( index, value ) {
var eventDate = new Date(value.start);
var keyDateFormat = $.fullCalendar.formatDate(eventDate, 'dd MMM yyyy');
if (eventsByDayNYC[keyDateFormat] === undefined) { // date doesn't exist as key
//Create events array and add it
var temp_events = [];
I do have this code:
controller = Backbone.Controller.extend({
routes: {
'/': 'home'
},
home: function() {
var view = new views.Home();
this.res && this.res.send(view.el);