Skip to content

Instantly share code, notes, and snippets.

View rjfranco's full-sized avatar
🙂
Either working or playing video games

Ramiro Jr. Franco rjfranco

🙂
Either working or playing video games
View GitHub Profile
@rjfranco
rjfranco / attempting-each-XML-object.rb
Created April 13, 2011 03:57
Attempting to do Each on XML object created using XmlSimple Gem
require 'net/http'
require 'rubygems'
require 'xmlsimple'
=begin
Sample Object in XML
<?xml version="1.0" encoding="UTF-8"?>
<ADS>
@rjfranco
rjfranco / linkforclark.html
Created April 14, 2011 16:29
The link from our paper's site to the pdf provided by clark.wa.gov
<a href="http://www.clark.wa.gov/commdev/documents/animal/adv-bd-app.pdf">http://www.clark.wa.gov/commdev/documents/animal/adv-bd-app.pdf</a>
@rjfranco
rjfranco / elling-error.txt
Created April 16, 2011 22:17
ellington error
MultipleObjectsReturned at /news/2011/apr/16/the-heart-and-the-fist-works-well/
get() returned more than one Rate -- it returned 2! Lookup parameters were {'user': <django.utils.functional.SimpleLazyObject object at 0x55b6650>}
Request Method: GET
Request URL: http://www.columbian.com/news/2011/apr/16/the-heart-and-the-fist-works-well/
Django Version: 1.2.5 SVN-16026
Exception Type: MultipleObjectsReturned
Exception Value:
get() returned more than one Rate -- it returned 2! Lookup parameters were {'user': <django.utils.functional.SimpleLazyObject object at 0x55b6650>}
Exception Location: /home/code.django-1.0/django/db/models/query.py in get, line 349
Python Executable: /usr/bin/python
@rjfranco
rjfranco / maps.js
Created May 3, 2011 22:10
A map js file with issues.
for (var i = 0; i < businesses.length; i++) {
codeAddress(businesses[i].address,i,function(i,point){
var description = businesses[i].description;
if(businesses[i].business_type == "Wine"){
//http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=A|00CC99|000000
var icon = 'http://google-maps-icons.googlecode.com/files/wineyard.png';
}else if(businesses[i].business_type == "Golf"){
var icon = 'http://google-maps-icons.googlecode.com/files/golf.png';
}else{
traceroute to columbian.com (24.124.1.226), 64 hops max, 52 byte packets
1 192.168.0.1 (192.168.0.1) 1.507 ms 1.146 ms 1.227 ms
2 73.91.116.1 (73.91.116.1) 8.358 ms 13.108 ms 9.715 ms
3 ge-3-34-ur02.vancouver.wa.bverton.comcast.net (68.85.148.189) 10.437 ms 22.265 ms 10.514 ms
4 xe-2-1-1-0-ar03.troutdale.or.bverton.comcast.net (68.87.216.81) 10.360 ms 24.099 ms 24.237 ms
5 68.86.90.213 (68.86.90.213) 24.933 ms 19.666 ms
68.86.95.97 (68.86.95.97) 16.160 ms
6 4.59.234.21 (4.59.234.21) 17.591 ms 33.059 ms 14.057 ms
7 * ae-32-52.ebr2.seattle1.level3.net (4.68.105.62) 21.464 ms 51.324 ms
8 ae-2-2.ebr2.denver1.level3.net (4.69.132.54) 48.138 ms 60.027 ms 53.269 ms
@rjfranco
rjfranco / gist:1083920
Created July 15, 2011 02:28
Ellington Error
error at /admin/news/story/96347/
(111, 'Connection refused')
Request Method: POST
Request URL: http://www.columbian.com/admin/news/story/96347/
Django Version: 1.2.5 SVN-16026
Exception Type: error
Exception Value:
(111, 'Connection refused')
Exception Location: /usr/lib/python2.5/site-packages/amqplib/client_0_8/transport.py in __init__, line 58
Python Executable: /usr/bin/python
@rjfranco
rjfranco / _location_select.html.haml
Created August 31, 2011 00:40
Map Location Partial
- @area_maps.each do |map|
= f.input :area, :as => 'select', :collection => map.areas, :id => 'bad_id', :required => false, :wrapper_html => {:class => "map_selector_#{map.id}", :style => "display:none"}
= f.input :location_name, :required => false, |
:hint => "Use to describe an abstract location, e.g., \"By the front door\".<br /> This is only used if a location has not been selected.", |
:wrapper_html => { |
:class => "location_description", |
:style => "display:none" |
} |
@rjfranco
rjfranco / maplocation.html
Created August 31, 2011 17:18
sample map location output
<div id='location_selectors'>
<ul>
<li class="select optional geo_selector" id="activity_geo_location_input" style="display:none"><label for="activity_location_id">Geo location</label>
<select id="activity_location_id" name="activity[location_id]">
<option value="1256">1256</option>
<option value="2664">2664</option>
<option value="3986">3986</option>
</select>
</li>
<li class="select optional map_selector_420" id="activity_area_input" style="display:none">
@rjfranco
rjfranco / sample.scss
Created October 7, 2011 00:30
sample.scss
@import "reset";
@mixin rounded($radius: 5px) {
border-radius: $radius;
-moz-border-radius: $radius;
-webkit-border-radius: $radius;
}
@mixin shadow($dist: 5px, $str: 3px, $top: 0, $left: 0, $color: rgba(0,0,0,.1) ) {
box-shadow: $color $top $left $dist $str;
@rjfranco
rjfranco / post.rb
Created November 27, 2011 22:28
Pieces of Rails App that is Giving no "name" method error
# Post Model
class Post < ActiveRecord::Base
belongs_to :user
validates :title, :presence => true
validates :content, :presence => true
end