Skip to content

Instantly share code, notes, and snippets.

@gdiaz
gdiaz / log
Created July 18, 2012 12:10
Error
Uncaught Error: Mismatched anonymous define() module: function (a,b,c){var d=c.extend({className:"modal hide fade picker",initialize:function(){a.bindAll(this)},show:function(a){this.$el.html(a.el).modal(),a.on("vlex:onClose",this.hide)},hide:function(){this.$el.modal("hide"),this.$el.empty(),this.trigger("vlex:onClose")}});return new d}
http://requirejs.org/docs/errors.html#mismatch
@gdiaz
gdiaz / proxy.php
Created May 28, 2012 18:08
Proxy php via remote_auth
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
Redireccionando a vLex ...
<script>
// url generada con remote_auth lib proporcionada por vlex
@gdiaz
gdiaz / integration-send-key.log
Created May 16, 2012 15:35
ITESO: Send key Response
response: #<Net::HTTPNotFound 404 Not Found readbody=true>
http://quijote.biblio.iteso.mx/wardjan/login.aspx?resource=vlex&cmn=updatekey
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>The page cannot be found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
@gdiaz
gdiaz / model.js
Created May 10, 2012 14:33
Config example
define([
'underscore',
'backbone',
'config'
], function (_, Backbone, Config) {
return Backbone.Model.extend({
url: function() {
return Config.host + '/route_to_resoure';
},
@gdiaz
gdiaz / folder_item.js
Created May 10, 2012 11:47
folder item with object
define([
'underscore',
'backbone',
'models/document',
'models/source'
], function (_, Backbone, Document, Source) {
return Backbone.Model.extend({
initialize: function(attributes) {
if (!attributes.object) return;
@gdiaz
gdiaz / vlex_log
Created February 9, 2012 11:57
apache access log
** [out :: tornasol.vlex.com] 192.168.166.130 - - [09/Feb/2012:11:44:29 +0100] "GET /source/london-gazette-2583/toc/022?page=5 HTTP/1.0" 200 5721 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
** [out :: tornasol.vlex.com] 192.168.166.130 - - [09/Feb/2012:11:46:21 +0100] "GET /source/london-gazette-2583/toc/018?page=2 HTTP/1.0" 200 5976 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
** [out :: tornasol.vlex.com] 192.168.166.130 - - [09/Feb/2012:11:46:56 +0100] "GET /source/london-gazette-2583/toc/020?page=5 HTTP/1.0" 200 5439 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
** [out :: tornasol.vlex.com] 192.168.166.130 - -
** [out :: tornasol.vlex.com] [09/Feb/2012:11:46:49 +0100] "GET /source/london-gazette-2583/toc/007?page=2 HTTP/1.0" 200 6884 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
** [out :: tornasol.vlex.com] 192.168.166.130 - - [09/Feb/2012:11:47:09 +0100] "GET /sour
@gdiaz
gdiaz / bash command
Created January 9, 2012 16:13
Rubygems update
gem install -v 1.4 rubygems-update && ruby `gem env gemdir`/gems/rubygems-update-1.4.0/setup.rb
@gdiaz
gdiaz / article9.html5
Created November 14, 2011 18:02
Awaken section
<section class="article" id="articulo9" data-article-number="9">
<header>
<h1>ARTÍCULO 9o</h1>
<h2>- Se consideran residentes en territorio nacional:</h2>
</header>
<p>I. A las siguientes personas físicas:</p>
<ol class="alpha">
<li value="1">
<p>Las que hayan establecido su casa habitación en México. Cuando las personas físicas de que se trate también tengan casa habitación en otro país, se considerarán residentes en México, si en territorio nacional se encuentra su centro de intereses vitales. Para estos efectos, se considerará que el centro de intereses vitales está en territorio nacional cuando, entre otros casos, se ubiquen en cualquiera de los siguientes supuestos:</p>
<ol>
@gdiaz
gdiaz / render_ex
Created September 15, 2011 15:55
Custom rendering for bad designs
# application_controller
def render_as_string_specific_action(controller, action, params)
controller.class_eval {
def params=(params); @params = params end
def params; @params end
}
c = controller.new
c.request = @_request
c.response = @_response
c.params = params
@gdiaz
gdiaz / textos4 vids
Created June 29, 2011 15:26
textos4 vids
>> Textos4.connection.select_values('select vid_documento from textos')
=> ["303449232", "388563340", "388563340", "390906266", "390906266", "390996160", "390996160", "700000000", "700000000", "717714687", "1000000021", "1000000021", "1000000021", "1000000021", "1000000021", "1000000021", "1000000022", "1919100013", "1919100015", "1919100022", "1919100033", "2147483647", "2147483647", "2147483647", "2147483647", "2147483647", "2147483647", "2147483647"]