I always forget how to turn off line numbers in VI. The answer is: set nonumbers or set nonu. It’s all about the little things…
Did you find this post useful or have questions or comments? Please let me know!
I always forget how to turn off line numbers in VI. The answer is: set nonumbers or set nonu. It’s all about the little things…
Did you find this post useful or have questions or comments? Please let me know!
→ No CommentsTags: How Tos · linux
One of my more popular posts is How to Push a Hash on to an Array in PERL, but how do you push a dict on to a list in Python?
Lists are one-dimensional arrays and dicts are associative arrays or hash arrays. This means we can do the same thing we do in other languages, with syntax to match Python’s object-oriented data structures.
import pprint
# Define the list
somelist = []
# Do add some elements to the list
somelist.append({'key1':'value1', 'key2': 'value2'})
somelist.append({'key1':'value1', 'key2': 'value2'})
somelist.append({'key1':'value1', 'key2': 'value2'})
# Print it out
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(somelist)
Will give you:
[ { 'key1': 'value1', 'key2': 'value2'},
{ 'key1': 'value1', 'key2': 'value2'},
{ 'key1': 'value1', 'key2': 'value2'}]
Did you find this post useful or have questions or comments? Please let me know!
→ No CommentsTags: How Tos · Programming · python · Software
Before we get started, if you have a personal calendar, Google has a quick how-to here. The Google tutorial only covers basic calendars. This tutorial will cover both personal and shared calendars.
Google Calendar is neat and pretty much every phone and app has some sync system that works with it… except Thunderbird with the Lightning Add-on. Actually it does, it’s just not intuitive.
NOTE: If you use the Sunbird stand-alone calendar client, the steps are essentially the same, but some menu options may be different.
What you need:
Thunderbird (2.x works, but >= 3.01 is better)
Lightning Add-on (.9x for Thunderbird 2.x, >=1.0b1 for TB 3.0.x)
A Google Calendar or access to a shared Google Calendar.
What to do:
https://www.google.com/calendar/dav/[Google Calendar ID]/events
In the case of a personal calendar, the ID is simply your gmail.com address such as this:
https://www.google.com/calendar/dav/BigTurnip@gmail.com/events
In the case of a shared calendar the ID is fugly, like this:
https://www.google.com/calendar/dav/utqisjt6b9hoot6i9o2jk1k9qg%40group.calendar.google.com/events
To get that string, log in to your Google calendar and go to the calendar settings. Down by the XML, iCAL and HTML links there is something like this:
(Calendar ID: SomeBigNastyStringOfJunk@group.calendar.google.com)
That’s your prize!
Happy calendaring.
Did you find this post useful or have questions or comments? Please let me know!
→ 1 CommentTags: Calendaring · Google · How Tos · iCal · lightning · Sunbird · thunderbird · WebDav