Skip to content

Instantly share code, notes, and snippets.

View rodriguezartav's full-sized avatar

Roberto Rodriguez rodriguezartav

View GitHub Profile
require('lib/setup')
Spine = require('spine')
GeneralModal = require("modals/generalModal")
class App extends Spine.Controller
@extend Spine.Controller.ModalController
#
@rodriguezartav
rodriguezartav / gist:3788752
Created September 26, 2012 15:37
Command Example
public class CommandRegistroCreate implements InterfaceCommand {
public registro__c registro;
public string action = 'insert';
public CommandRegistroCreate(string id,string departamento, string tipo , string description, decimal monto){
this.registro = new registro__c();
this.registro.Responsable__c = id;
this.registro.departamento__c = departamento;
@rodriguezartav
rodriguezartav / gist:2320647
Created April 6, 2012 15:06
PARSE JS FROM SINATRA
#headers = Hash['Content-Type' => 'application/json; charset=utf-8' , 'X-Parse-Application-Id' => "XXXXXXXXXXXXXXXX" ,
#'X-Parse-REST-API-Key' => "XXXXXXXXXXXXX"]
#parse_result = https("api.parse.com").get('/1/classes/Cierre?where={"fecha":{"$ne":"' + fecha + '"}}&order=-createdAt&limit=1',headers).body
#parse_result = JSON.parse parse_result
post "/cierre" do
headers = Hash['Content-Type' => 'application/json; charset=utf-8' , 'X-Parse-Application-Id' => "XXXXXXXXXXXXX" ,
'X-Parse-REST-API-Key' => "XXXXXXXXXXXXXXXX"]
cierre_raw = params[:cierre]
cierre = JSON.parse cierre_raw
docpad generate
cp -R out/ ./
@rodriguezartav
rodriguezartav / Docpad Ej1
Created December 30, 2011 21:57
Docpad Post about Meta Data and Looping
**** This is the meta data for this file/post *****
---
title: "Roberto Rodriguez's Blog"
layout: 'blog'
description: 'A static blog on NodeJS'
post_title: "How I build this"
---
*** and this is the way I list it on the side bar ***
<h4>Posts</h4>
@rodriguezartav
rodriguezartav / slider
Created October 25, 2011 00:58
It makes a Slider
#STYL CSS
turn_into_slider( items, width , height)
position: relative
display: inline-block
width: width
height: height
overflow: hidden
.slider
position: absolute
@rodriguezartav
rodriguezartav / gist:1285147
Created October 13, 2011 18:56
Spine Folder Structure
-app
-assets
-javascripts
-app
-controllers
-models
-views
-lib
-vendor
@rodriguezartav
rodriguezartav / application.html.haml
Created October 13, 2011 18:53
Basic Layout Haml for Rails Generated Views
!!!Strict
%html{ }
%head
%title RubyConfBr2011SimpleApplication
%meta{'http-equiv'=>"Content-Type", :content=>"text/html; charset=utf-8"}/
%meta{'http-equiv'=>"Content-Language", :content=>"en-us"}/
= stylesheet_link_tag :scaffolds
%body
@rodriguezartav
rodriguezartav / pages_controller.rb
Created October 13, 2011 18:47
Pages Controller
class PagesController < ApplicationController
def home
render 'home' ,:layout => 'js'
end
end
@rodriguezartav
rodriguezartav / GEM
Created October 13, 2011 18:43
Gem File for Rails 3.1 that will run a SpineJS App with stitch , mongo, sass and compass
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do