Skip to content

Instantly share code, notes, and snippets.

View batok's full-sized avatar

Domingo Aguilera batok

  • Consultant
  • Guadalajara, Mexico
  • X @batok
View GitHub Profile
; CouchDB Configuration Settings
; Custom settings should be made in this file. They will override settings
; in default.ini, but unlike changes made to default.ini, this file won't be
; overwritten on server upgrade.
[CouchDB]
database_dir = /alternatepath
;MaximumDocumentSize=4294967296 ; bytes
from couchdb.schema import Document, View, IntegerField, TextField
from couchdb import Database
map_fun = """
function(doc){
emit(doc.name, doc.age);
}
"""
from couchdb.schema import Document, View, IntegerField, TextField
from couchdb import Database
map_fun = """
function(doc){
emit(doc.name, doc.age);
}
"""
rom couchdb.schema import Document, View, IntegerField, TextField
from couchdb import Database
map_fun = """
function(doc){
emit(doc.name, doc.age);
}
"""
lDias = ["Ausencias", "Permisos sin Goce de Sueldo", "Incapacidades", "Incapacidades EG", "Incapacidades maternidad","Incapacidades RT", "Sueldo Pendiente"]
lCampos = ["+ausencias", "+permisos_sin_goce", "+incapacidades", "+incapacidades_eg", "+incapacidades_maternidad", "+incapacidades_rt","-sueldo_pendiente"]
dlg = wx.MultiChoiceDialog(self.parent, u"Indique lo que se va a reconocer para obtener días", u"Días", lDias)
if dlg.ShowModal() == wx.ID_OK:
sDias = dlg.GetSelections()
dlg.Destroy()
lqdias = [" %s coalesce(b.%s,0)" % (x[0],x[1:]) for i,x in enumerate(lCampos) if i in (sDias) ]
qdias = "0 as diasdescontados, "
@batok
batok / gist:34201
Created December 10, 2008 02:19
hack to make virtual and grouping objectlistview in Mac OS X
def RefreshObjects(self, aList=None):
"""
Refresh all the objects in the given list
"""
self.lastGetObjectIndex = -1
# If no list is given, refresh everything
if aList:
for x in aList:
idx = self.GetIndexOf(x)
if idx != -1:
@batok
batok / gist:34202
Created December 10, 2008 02:23
This is also a hack on ObjectListView.py to make the control work in virtual and group mode in Mac OS X
def RefreshObjects(self, aList=None):
"""
Refresh all the objects in the given list
"""
# We can only refresh everything
self.lastGetObjectIndex = -1
print self.GetItemCount()
if self.GetItemCount() == 0:
pass
else:
function inicio(){
dojo.query(".headLink").forEach(function(n){
var widget = new dojox.widget.FisheyeLite({
properties: {
height:65
},
easeOut:dojox.fx.easing.bounceOut,
durationOut:700
},n);
var myTarget = dojo.query(".subtext",n)[0];
Searching for sprox
Reading http://turbogears.org/2.0/downloads/current/index/sprox/
Couldn't find index page for 'sprox' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://turbogears.org/2.0/downloads/current/index/
No local packages or download links found for sprox
error: Could not find suitable distribution for Requirement.parse('sprox')
earching for Catwalk
Reading http://turbogears.org/2.0/downloads/current/index/Catwalk/
Couldn't find index page for 'Catwalk' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://turbogears.org/2.0/downloads/current/index/
No local packages or download links found for Catwalk
error: Could not find suitable distribution for Requirement.parse('Catwalk')