Skip to content

Instantly share code, notes, and snippets.


Antonio Antillon antillas21

View GitHub Profile
View gist:5632645
|public/ (home of drupal install)
|fixtures (db dumps, legacy data to be imported)
View proposed.json
"properties": {
View post_spec.rb
# spec/models/post_spec.rb
require 'spec_helper'
describe Post do
let(:post) { }
describe 'basic attributes' do
it 'needs a title, content and name' do
post.title = 'post title'
antillas21 / gist:3724857
Created Sep 14, 2012
Common Media Queries - 2012
View gist:3724857
/* SOURCE: */
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
/* Smartphones (landscape) ----------- */
View gist:3537260
class Contact
delegate :vertical, :to => :campaign, :prefix => true
class Campaign
delegate :name, :to => :vertical, :prefix => true
contact = Contact.find(1)
camp = Campaign.find(2)
View gist:3536739
source :rubygems
gem 'rake'
gem 'sinatra', '~> 1.2.3'
gem 'shotgun', '~> 0.9'
gem 'haml', '~> 3.1.4'
# Sass & Compass
gem 'sass', '~> 3.1.12'
gem 'compass', '~> 0.11.6'
antillas21 / gist:3184092
Created Jul 26, 2012
OpenGraph Metatags
View gist:3184092
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:country-name" content="México">
<meta property="og:site_name" content="Cuauhtémoc Moctezuma">
<meta content="Cuauhtémoc Moctezuma premia el hábito de la lectura" about="/es/cuauhtemoc-moctezuma-premia-el-habito-de-la-lectura" property="dc:title">
<link rel="shortcut icon" href="" type="image/">
<meta about="/es/cuauhtemoc-moctezuma-premia-el-habito-de-la-lectura" property="sioc:num_replies" content="0" datatype="xsd:integer">
<meta property="og:url" content="">
<meta property="og:image" content="">
<link rel="canonical" href="/es/cuauhtemoc-moctezuma-premia-el-habito-de-la-lectura">
antillas21 / Gemfile
Created Jul 23, 2012
elasticsearch - playing around
View Gemfile
# ... gems
# para este demo, al guardar un registro, vía geocoder obtenía su geolocalizaicón
gem 'geocoder'
# Ruby API & DSL, with ActiveRecord/ActiveModel integration.
gem 'tire'
# elasticsearch requiere que el modelo a indexar soporte paginación,
# lo podemos lograr con will_paginate o kaminari (your choice)
antillas21 / gist:3132604
Created Jul 17, 2012
ctsteps.auth cucumber
View gist:3132604
~/Documents/Apps/TangoSource/ctsteps-authorization-server [testing]$ rake cucumber
/Users/aantillon/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
Feature: Change password
Background: # features/change_password.feature:3
Given a client # features/step_definitions/homepage_backrgound_steps.rb:2
And I have an account # features/step_definitions/forgot_password_steps.rb:1
execution expired (Timeout::Error)
/Users/aantillon/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:540:in `initialize'
antillas21 /
Created Jul 12, 2012
Result from => ./ syncdb --noinput
vagrant@lucid64:/vagrant$ ./ syncdb --noinput
Traceback (most recent call last):
File "./", line 14, in <module>
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 438, in execute_manager
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 379, in execute
File "/usr/local/lib/python2.7/site-packages/django/core/management/", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
You can’t perform that action at this time.