Skip to content

Instantly share code, notes, and snippets.

View antillas21's full-sized avatar

Antonio Antillon antillas21

  • Mexicali, Mexico
View GitHub Profile
@antillas21
antillas21 / console.sh
Created July 11, 2012 18:15
Gem Bundle
~/Documents/Apps/TangoSource/ctsteps-authorization-server [master*]$ bundle
Using rake (0.8.7)
Using multi_json (1.3.6)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.6)
@antillas21
antillas21 / bundle-install
Created July 11, 2012 00:30
Bundle error
~/Documents/Apps/TangoSource/ctsteps-authorization-server [master]$ bundle install
Fetching gem metadata from http://gems.onterraresearch.net/.
Fetching full source index from http://gems.onterraresearch.net/
Fetching gem metadata from http://rubygems.org/........
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/aantillon/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:650:in `load': uninitialized constant Psych::Object (NameError)
from /Users/aantillon/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:650:in `_load'
from /Users/aantillon/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler/fetcher.rb:57:in `load'
from /Users/aantillon/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler/fetcher.rb:57:in `fetch_spec'
@antillas21
antillas21 / Gemfile
Created July 6, 2012 07:38
CKEditor dependencies
source 'https://rubygems.org'
# long list of gems
gem 'rails_admin' # to handle auth and adding content
gem "ckeditor", "3.7.1"
# ckeditor gem is the one responsible for making the WYSIWYG editor available
# even more gems
@antillas21
antillas21 / rough_draft.md
Created July 4, 2012 17:01
Tweet capturado con TweetStream

##Flujo

  • Abrir un cliente al Streaming API de twitter via la gema TweetStream
  • Este cliente debe estar siempre funcionando y proveer un comportamiento cuando haya necesidad de reconnectarse (por problemas en twitter y diversos) y en caso de error (por las mismas causas) # Leer documentacion de la gema
  • El cliente debe enviar todos los tweets capturados en base a un query='on @dimensions, @dimensions' a un Array o a un queue.
  • A través de un background_job, procesar el queue, leyendo de cada tweet capturado, el atributo :expanded_url (provisionando que puede ser nulo o empty)
  • El background_job debe hacer una búsqueda en los feed_entries con ese valor capturado. Si encuentra un match, entonces += 1 a su tweet_count.
@antillas21
antillas21 / Presentation.md
Created June 28, 2012 06:19
Quick & Dirty Geolocation ...en Rails

#Quick & Dirty Geolocation ...en Rails

¿Qué necesitamos?

  • Rails app
$ rails new geostore
@antillas21
antillas21 / gist:2938438
Created June 15, 2012 19:57
Group right en teaser de actividades
<div class="group-right">
Eventos<div class="field field-name-title field-type-ds field-label-hidden"><div class="field-items"><div class="field-item even"><h2><a href="/es/actividades/erat-mauris-neque/">Erat Mauris Neque</a></h2></div></div></div><div class="field field-name-field-event-date field-type-datetime field-label-hidden"><div class="field-items"><div class="field-item even"><span class="date-display-single">Martes, Agosto 2, 2011</span></div></div></div><div class="field field-name-activity-time field-type-ds field-label-hidden"><div class="field-items"><div class="field-item even">A las 11 hrs / Entrada Libre</div></div></div><div class="field-group-format group_body_readmore field-group-div group-body-readmore speed-none effect-none"><p>Etiam a turpis tincidunt leo gravida hendrerit in vel tellus.</p><a href="/es/actividades/erat-mauris-neque/">Ver detalle</a></div><div class="field field-name-share-icon field-type-ds field-label-hidden"><div class="field-items"><div class="field-item eve
@antillas21
antillas21 / application.rb
Created June 15, 2012 01:39
RSpec configuration in application.rb
# configuring generators
config.generators do |g|
g.test_framework :rspec, :fixtures => true, :view_specs => false, :helper_specs => false,
:routing_specs => false, :controller_specs => true, :request_specs => true
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
end
@antillas21
antillas21 / gist:2932993
Created June 14, 2012 21:14
Git cleaned the master branch
~/Documents/Apps/StoneGiantLabs/crosstown [master*]$ git clean -xdf
Removing .bundle/
Removing Gemfile.lock
Removing app/
Removing db/
Removing log/
Removing tmp/
Removing vendor/
~/Documents/Apps/StoneGiantLabs/crosstown [master]$ git lg
@antillas21
antillas21 / Vagrantfile.rb
Created April 23, 2012 17:40
Sample Vagrantfile
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "lucid64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@antillas21
antillas21 / sites.php
Created April 16, 2012 21:23
Steps to take Drupal site out of multi-site install
<?php
$sites = array(
'sitename.com' => 'sitename.com',
// the first sitename.com in the file, refers to the url content in the browser's window,
//you may/probably should replace this with a FQDN.
// the second sitename.com appearing after '=>' is the directory name inside sites/ where
//the site files are stored.
);