Ok, so I'm only posting this because I had problems with booting Linux from a flash drive on some of the Dells around here (most notable a GX270 and a Precision 650). I could boot Slax and DSL just fine on most machines, but on the Dells, I got the error "Unable to load operating system". The fix for this was found on the DSL Wiki, and it dictates that you have to overwrite the MBR of the flash drive with something called ms-sys . I did this, and booting on those problem Dells became easy.
Wezzul.com - It's the Dinglez
Home >> Posts in february 2007
In the project I am currently working on, I have to take data from a form field and generate images from it. These images need to have a transparent background. Here is the way I did that:
# create the original canvas giving it width and height
canvas = Image.new("RGBA", (W,H))
# select a font (you need to have compiled PIL with freetype installed for the
#_imagingft module to be on the server. This is necessary for this process.
font = ImageFont.truetype("/path/to/ttf/font", size_int)
# setup image to draw text on it
draw = ImageDraw.Draw(canvas)
black = "#000000"
# draw text on canvas, using offsets from upper left corner
draw.text((25,2),text,fill=black,font=font)
newImg = someFileHandle
canvas.save(newImg, "image_type")
newImg.close()
Done!
# create the original canvas giving it width and height
canvas = Image.new("RGBA", (W,H))
# select a font (you need to have compiled PIL with freetype installed for the
#_imagingft module to be on the server. This is necessary for this process.
font = ImageFont.truetype("/path/to/ttf/font", size_int)
# setup image to draw text on it
draw = ImageDraw.Draw(canvas)
black = "#000000"
# draw text on canvas, using offsets from upper left corner
draw.text((25,2),text,fill=black,font=font)
newImg = someFileHandle
canvas.save(newImg, "image_type")
newImg.close()
Done!
This one took me a minute to figure out, but I'm happy I did. To create a new skin from the filesystem, and add your own layers to it (or in this case, add the layers from Plone Default), do the following:
Pretty straight forward, right? In any case, it is helping me immensely with the current project.
#use this to get the skins directory
ps = getToolByName(self,'portal_skins')
# use this to add a new folder to that directory for your new skin
ps.manage_addFolder(skin_id, skin_id)
newSkinFolder = getattr(ps, skin_id)
path = newSkinFolder.absolute_url()
# get a set of tuples of all skins
paths = ps.getSkinPaths()
# these lines get the layers from Plone Default
defPath = paths[0]
defPath = defPath[1]
# add your new folder to the top of the Plone Default layers
defPath = skin_id "," defPath
# add the skin to the properties of portal_skins
ps.addSkinSelection(skin_id, defPath, 0, 0)
ps = getToolByName(self,'portal_skins')
# use this to add a new folder to that directory for your new skin
ps.manage_addFolder(skin_id, skin_id)
newSkinFolder = getattr(ps, skin_id)
path = newSkinFolder.absolute_url()
# get a set of tuples of all skins
paths = ps.getSkinPaths()
# these lines get the layers from Plone Default
defPath = paths[0]
defPath = defPath[1]
# add your new folder to the top of the Plone Default layers
defPath = skin_id "," defPath
# add the skin to the properties of portal_skins
ps.addSkinSelection(skin_id, defPath, 0, 0)
Pretty straight forward, right? In any case, it is helping me immensely with the current project.
Last 20 Links into site from Google.com:
atmosphere its everything but me
linux move windows between displays
atmosphere %2B lyrics "it's the nicotine"
atmosphere %2B lyrics "it's the nicotine"
atmosphere %2B lyrics "it's the nicotine"
wps54g default ip
curtis granderson girlfriend
pvr-350 lircd.conf
sugarcrm torrent host
reset ip address linksys
what is the default ip address for wps54g
beer can cock galleries
curtis granderson girlfriend
how to reset linksys print server
linksys router command line
wps54g reset defaults
yesterday when i was young lirc
plone sucks
xbox dvd remote mythtv lircrc
linksys can't find print server
atmosphere its everything but me
linux move windows between displays
atmosphere %2B lyrics "it's the nicotine"
atmosphere %2B lyrics "it's the nicotine"
atmosphere %2B lyrics "it's the nicotine"
wps54g default ip
curtis granderson girlfriend
pvr-350 lircd.conf
sugarcrm torrent host
reset ip address linksys
what is the default ip address for wps54g
beer can cock galleries
curtis granderson girlfriend
how to reset linksys print server
linksys router command line
wps54g reset defaults
yesterday when i was young lirc
plone sucks
xbox dvd remote mythtv lircrc
linksys can't find print server
