This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fitoria@fitoria-laptop:~/Videos$ tree | |
. | |
|-- 24c3-2303-en-inside_the_macosx_kernel-COMPATIBLE.mp4 | |
|-- After Forever - Live at Artmania (17-06-2007) (TV Rip).avi | |
|-- Anders C# 4.0TL16.wmv | |
|-- Apocalyptica - Rock Am Ring 2005 TVRip.avi | |
|-- Carcass_-_Keep_On_Rotting_In_The_Free_World.mpg | |
|-- Carcass_Wake.Up.And.Smell.avi | |
|-- Cavalera Conspiracy - Live at Graspop, Belgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def vista(request): | |
foo=OneModel.objects.all() | |
bar=Othermodel.objects.all() | |
return render_to_response('foo.html', {'foo': foo, 'bar': bar}) | |
def vista(request): | |
foo=OneModel.objects.all() | |
bar=Othermodel.objects.all() | |
dict = {'foo': foo, 'bar': bar} | |
return render_to_response('foo.html', dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gtk | |
class TinyButton(gtk.Button): | |
'''a simple and tiny button''' | |
def __init__(self, stock): | |
'''constructor''' | |
gtk.Button.__init__(self) | |
self.image = gtk.image_new_from_stock(stock, gtk.ICON_SIZE_MENU) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mi admin.py | |
-------------------------- | |
from django.contrib import admin | |
from sitioprueba.books.models import Publisher, Author, Book, Tienda | |
import settings | |
media = settings.MEDIA_URL | |
class ArticleAdmin(admin.ModelAdmin): | |
# TinyMCE | |
js = ('../files/js/tiny_mce/tiny_mce.js','../files/js/editores/textareas.js',) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(firefox:6211): Moonlight-WARNING **: Forcing client-side rendering because we detected binary drivers which are known to suffer performance problems. | |
windowless mode | |
(firefox:6211): Moonlight-WARNING **: Forcing client-side rendering because we detected binary drivers which are known to suffer performance problems. | |
windowless mode | |
Moonlight 1.0.1 | |
Moonshine 0.2 | |
Firefox 3.0.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*tinyMCE.init({ | |
mode : "textareas", | |
theme : "simple" | |
});*/ | |
tinyMCE.init({ | |
mode : "textareas", | |
theme : "advanced", | |
//content_css : "/appmedia/blog/style.css", | |
theme_advanced_toolbar_location : "top", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from sitioprueba.books.models import Publisher, Author, Book | |
#info encontrada en: http://code.djangoproject.com/wiki/AddWYSIWYGEditor | |
class BookOptions(admin.ModelAdmin): | |
class Media: | |
#ruta al javascript de TinyMCE y de textarea.js | |
#importante poner ../ en la ruta. Esto puede cambiar según tu urls.py | |
js = ('../files/js/tiny_mce/tiny_mce.js', | |
'../files/js/editores/textareas.js') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for img in `ls *.jpg` | |
do | |
echo $img | |
mogrify -resize 1900x -compress jpeg -quality 70 $img # donde dice -resize 1900x le podes cambiar el tamaño si queres | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@ludoslegio ~]# yum install php-bcmath | |
base 100% |=========================| 1.1 kB 00:00 | |
updates 100% |=========================| 951 B 00:00 | |
addons 100% |=========================| 951 B 00:00 | |
extras 100% |=========================| 1.1 kB 00:00 | |
Setting up Install Process | |
Parsing package install arguments | |
Resolving Dependencies | |
--> Running transaction check | |
---> Package php-bcmath.i386 0:5.1.6-23.2.el5_3 set to be updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##current version: fails when the user is anonymous. | |
favorited = question.has_favorite_by_user(request.user) | |
question_vote = question.votes.select_related().filter(user=request.user) | |
if question_vote is not None and question_vote.count() > 0: | |
question_vote = question_vote[0] | |
##modified by me: | |
favorited = question.has_favorite_by_user(request.user) | |
if not request.user.is_anonymous(): |