These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
LeechBlock :: A Way to Block Time Wasting WebsitesLeechBlock is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block, between which time periods, and on which days of the week.
Tags: Ajax, Compatibility, Css, Digg, Firefox, Google, Hosts, Ie, Javascript, Openid, Reddit, Time, Toread, Win32
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST
1 Comment »
This tortuous tutorial will walk you through the steps of changing the screen size (resolution) and improving the colors in your VMware player’s guest OS. The guest OS is assumed to be a Windows variant (e.g., Windows 2000, Windows XP, etc).
I start off by assuming you have installed the latest version of VMware Player and you have installed a windows based virtual machine that runs in the player. But you’re disappointed because you’re having an experience like mine:
When I go to display properties settings, I’m only allowed 16 colors and the screen area slider only offers 640 by 480 and 800 by 600. But when I change it to 800×600, and click ok, when I come back to the display settings, it has gone back to 640×480.
Well, the answer is simple enough. You need to install the VMware tools for the VMware Player.
Here’s how to do that:
Mr. Hutchinson provides a good overview of the process for Linux host OS. We just need to adapt it for a Windows host OS:
1. Download the latest “Archived Version” of VMware Workstation in “.tar.gz” format at http://www.vmware.com/download/ws/. You do not need to be registered nor have a VMware Workstation license key to download this version.
However VMware kept asking me to register and stuff. I found downloading this file directly was adequate instead:
http://download3.vmware.com/software/wkst/VMware-workstation-5.5.0-18463.tar.gz
Next locate and extract the windows.iso VMware Tools image from the tarball.
Next you’ll need to either write the iso to a CD or mount the iso since we want to get at the files on it.
This daemons program worked for me for mounting an ISO in windows, and conveniently the guest OS even detected the mounted iso. (Warning it seems kinda spyware-ish to me, but that was just my impression. Be careful to at least uncheck the optional toolbar program
)
Now, in your guest OS, run setup.exe from the mounted drive and install VMware tools.
For me, right after install, my display settings had a lot more color and resolution options and the settings stuck after I changed them.
Posted by Greg Pinero (Primary Searcher) as win32, Other at 5:20 PM MST
Comments Off
If you’re on a Linux system, you can use the pyGTK library. It’s got a clipboard feature.
Here’s how to use it (code thanks to Thomas Lee):
import pygtk
pygtk.require('2.0')
import gtk
# get the clipboard
clipboard = gtk.clipboard_get()
# read the clipboard text data. you can also read image and
# rich text clipboard data with the
# wait_for_image and wait_for_rich_text methods.
text = clipboard.wait_for_text()
# set the clipboard text data
clipboard.set_text('Hello!')
# make our data available to other applications
clipboard.store()
Here is the gtk.clipboard documentation.
Another Alternative
An alternative to the GTK library is the Xsel command line program. It should work for any Linux (or Unix?) with X.
And this is how you would use it (at least according to these guys):
#Copy from the clipboard:
import os
s = popen('xsel').read()
#Paste to the clipboard:
import os
os.popen('xsel', 'wb').write(s)
Posted by Greg Pinero (Primary Searcher) as Python, Ubuntu at 12:06 AM MST
3 Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
The Python Debugger is REALLY EASYFirst of all, it’s worth showing just how easy it is to get started with my debugger, pdb. Add these lines to any stretch of Python:
import pdb
pdb.set_trace()
When the interpreter runs into pdb.set_trace(), it’ll drop into the pdb prompt.
Tags: Answermysearches, C, Card, Debug, Enye, Estimate, Greetingcard, Highlighter, Image, Latex, Moving, Pdf, Pictures, Ps2Pdf, Python, Sockets, Syntax, Title, Ubuntu, Unicode
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST
Comments Off
I was trying to put my formal Spanish name (Gregory Piñero) into a LaTeX document and convert it to PDF, but the PDF seemed to just leave out the enye (ñ) creating Gregory Piero.
Here’s the fix:
First run this command to install what you need:
$ sudo apt-get install latex-ucs latex-ucs-uninames
and then add these packages to your *.tex file:
\usepackage{ucs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
Found this answer here.
Posted by Greg Pinero (Primary Searcher) as Ubuntu at 12:24 AM MST
Comments Off