Python – Convert a Dictionary to a List

We can easily create a Python list by pulling only the values out of a dictionary. This is done via the values() method.

>>> x = {‘a’:1, ‘b’:2}
>>> x
{‘a’: 1, ‘b’: 2}
>>> y = list(x.values())
>>> y
[(1), (2)

More



Ruby on Rails + Gmail SMTP (TLS)

This took way too long to figure out the answer to without using a custom plugin. I hope this helps others! I was setting up Redmine with Gmail as an SMTP server utilizing config/email.yml. Behold!
email.yml with no other related changes in environment.yml using Rails 2.2.2
production:

delivery_method: :smtp
smtp_settings:
enable_starttls_auto: :true
address: smtp.gmail.com
port: 587
domain: GMAILDOMAIN.com
authentication: :plain
tls: :true
user_name: “EMAIL@YOURGMAILDOMAIN.com”
password: “YOURPASS”

If you [...]

More



List of Free and cheap Subversion (SVN) repository hosts

So currently I am hosting 4 SVN repos on the same box as our web server. The server is maintained by me and gets backed up not nearly enough. So before I have a disaster and lose months of work I began looking to at least store my code somewhere safer. In my search to [...]

More



The beautiful phrase “Man, I am an idiot…”

How often do you have “Man, I am an idiot” moments? Forgetting to pay a bill on time, saying something stupid and regretting it immediately after, or chopping the tip of your finger off cutting red peppers? Yeah, gross… Well if I did either of those things I dont think I would be too happy [...]

More



Log4net app.config with console and file logging

Here is a quick example .config of log4net that does basic logging to the console and to a text file. I found a great tutorial outlining the config here but it didnt have a full example anywhere from what I found.

More



Get Adobe Flash playerPlugin by wpburn.com wordpress themes