Apr 1, 2012 · 3 minute read · Comments
in my previous blog post, i briefly talked about syncing an android phone with icloud instead of google contacts. in this post, i’ll talk a little bit about cleaning up your google contacts.
so if you’re like me, you may not be quite ready to erase everything from google contacts (because the implicit result of this is that you will lose google chat access to these people (unless you request permission to chat with them again), and i believe you may also break google plus connections, but i am not certain about that one).
rather than cleaning up manually (which could take a long time, depending on the number of contacts you have), here is a way to start the clean up process.
- download googlecl. this open source project allows you to send commands to certain google services from the command line.
- download the gdata-python-client library. this is required to run googlecl.
- install both (untar, then
sudo python setup.py install on both).
now validate that it works - a good test would be running
google contacts list ahmed, to list any ahmeds you have in your contacts. this should open up a browser the first time to ask you to authenticate googlecl to use your account info.
now that we’re validated and authenticated, we can start doing things like this:
for i in `perl -e '$,=" ";print +(A..Z)'`; do
google contats list --fields=name,email,phone $i\* >> contacts;
# perhaps put a sleep here just to be safe and not get locked out.
the first part enumerates A-Z (got that bit from stackoverflow) - so for each character between A and Z, get all the names, emails, and phone numbers of my contacts. note that this causes certain records to appear many times, and i am not sure if there’s a better way to do this - perhaps just looping on a, e, i, o, u would suffice, but i am not sure.
now, you can do things like this:
# pull out unique contacts
cat contacts | sort | uniq > unique.contacts
# save contacts with no email address in a file for deletion
cat unique.contacts | grep ,None, | cut -f 1 -d ',' > to.delete
# save non-gmail contacts for deletion
cat unique.contacts | grep -v ',None,' | grep -v gmail | grep -v googlemail |
cut -f 1 -d ',' >> to.delete
# delete them
while read line
echo 'y' | google contacts delete "$line"
# perhaps add a sleep here if you're afraid of rate limit/lock out
done < to.delete
and there you have it. eventually, i’ll remove everyone from google contacts, but for now, this greatly reduces the number of people in google contacts that don’t need to be there.
that’s all for now!
Mar 28, 2012 · 3 minute read · Comments
google is a great company with useful products. however, due to its very business and monetization strategies, it has slowly lost some of the trust it once had with people. i won’t go into details here since many people have written on this topic in great details.
i think gina summarizes my concern fairly well with this quote:
If you spend as much time online as I do, you can pump a significant amount of personal information into the cloud every day. Think about what percentage of that cloud Google owns. For me, it’s three years of work and personal email in Gmail, years of events in Google Calendar, phone calls and voicemail in Google Voice, documents and spreadsheets in Google Docs, web page viewing habits in Google Reader. To top it all off, Google also has a record of everything I search the web for every day in their logs.
i use a lot of google products - i count 37 products on my account settings page. my intention is by no means to completely stop using google products, because i think it would be really difficult (if not impossible), especially when you take into consideration google apps (which many companies use), and the fact that i write apps for android. what i want to do, however, is decrease my reliance on google.
the first and foremost service i want to stop using is gmail.
above, you can see my gmail usage for march. so imagine that google were to lock me out of my account tomorrow, as they have to other people in the past… losing gmail would be a devastating blow - not because i don’t have backups of the emails there (i keep a backup via imap), but because people only have my gmail address, which means those people would no longer be able to talk to me.
as a result, i have taken my first steps towards liberating myself (at least partially) from google. the first of these steps was registering this domain and signing up for fastmail for email hosting (many talk about this on their sites). the nice part is that i own my domain, so if i decide to stop using fastmail (or fastmail decides to close down or whatever), i simply update dns and my email still reaches me. the k-9 and kaiten apps for android are great imap clients that work well with fastmail.
moreover, i bought the CardDAV Sync app for android and set it up to sync to icloud. i then disabled google’s contact syncing to my email. my next step is to clean out my google contacts by deleting whatever contacts and information that isn’t necessary to be there (phone numbers and addresses are probably the top concern).
that’s it for now!
Mar 26, 2012 · 2 minute read · Comments
so looking back at it, i’ve been blogging since 2004. unfortunately, as time went on, i have pretty much ignored this blog. so in an effort to start writing more, i’ve decided to make some changes.
first, i’ve switched the domain - if you notice, you’re now on helw.net. this domain is shorter, ties closer to my name, and, most importantly, gives me a good domain for an email address (ahmed@). more on the reasons for that in a future post insha’Allah.
secondly, i’ve switched blogging platforms… i’ve “baked” the site, which means that this page, for example, is a static page - no more php to generate pages. this means that things should be a little faster insha’Allah.
the tool i’ve chosen to use is octopress - it’s open source, easy to use, versatile, and, in summary, i like it :) posts are written as plain text (markdown). they are then converted into html and pushed to the server via rsync.
it’s fairly cool to be able to run
sed on a directory of files to find things, change urls, etc. i also store the blog’s sources in git, which is cool.
exporting wordpress was easy, thanks to exitwp. just to be clear, i love wordpress and think it’s a great product. i am only leaving it to try something new (hopefully something that will encourage me to blog more).
oh, i should mention that, as a result of this move, comments have been moved to disqus. for those migrating, don’t forget to ensure that
comments: true appears in the header section, otherwise, you’ll be wondering why comments aren’t working (thanks midnightcheese).
that’s about it for now!
Feb 16, 2012 · 1 minute read · Comments
i was inspired by salem’s tweet from yesterday to play around with ios 5 a bit.
i discovered this library, which makes it pretty easy to hook into siri. i found out that a brother (by the name of Bilal Ahmad, may Allah reward him) had beaten me to the idea long ago, however, and made a nice prayertimes extension for siri.
i decided to play around anyway, and not too much later, i had my own version (requiring only one command rather than 2 in brother Bilal’s version). it queries salah.com for its prayer times, and currently only returns isna based times.
i have a few other ideas that i’d like to do with this if time permits insha’Allah as well. no real plans on releasing it, but if anyone is interested, drop me a line and i can send you the source insha’Allah.
Feb 16, 2012 · 1 minute read · Comments
bismillah alra7man alra7eem.
on february 12th, we released quran android 1.6. this version was mostly intended as a bugfix release, but a few new features got in as well. some notable ones include search, repeat mode for ayahs, night mode for pages, and many bugfixes. it also happens to look nicer on the tablet now, and it works on ics (although if hardware acceleration is turned on, it can sometimes crash on orientation change).
we are currently working on the next major version of quran android - perhaps i’ll write about that at a later time insha’Allah.
Jan 23, 2012 · 1 minute read · Comments
i decided to merge the old masr.whatstheplot.com entries here into this blog since updating two blogs is more difficult than updating one :)
Jan 19, 2012 · 1 minute read · Comments
just for fun, i had written this (really simple) game for Android not long ago. i decided that i should release it rather than keep it on my hard drive doing nothing. it is really simple, but still, it is fun enough to try :)
if you have an android phone, download it a shot and let me know what you think - and if you have better graphical skills than i do, please feel free to send me some images :P
Jul 31, 2011 · 1 minute read · Comments
ramadan kareem! just for fun, here’s a list of some of the things i’ll be using this ramadan insha’Allah:
quran android - free, open source quran android application.
haramainrecordings - latest mp3s for salah at the haramain (including taraweeh!) these guys are awesome masha’Allah!
guidance for mac - know what time salah is with this useful tool on osx.
i want to remind myself and you guys to keep the ummah in our prayers, especially since many people are undergoing difficulties, war, tyranny, and so on…
Jul 10, 2011 · 1 minute read · Comments
so it’s been nearly 6 years since i posted here about pyboids… and since i love the idea of the boids algorithm so much (and was trying to play with core animation), i decided to try to write boids using core animation. it’s imperfect, but it works (and, technically speaking, it is 3d, although i don’t really have the functionality to rotate and such to prove it… well, not yet anyway).
the cool thing is that (theoretically speaking), this same code can easily run (without many changes) on an iOS device. core animation itself is really powerful - it helps make snazzy apps possible by making animations really simple (in many cases, core animation takes care of the animation for you, automagically and behind the scenes).
for those who don’t know, boids is an algorithm developed by craig reynolds to simulate the flight of birds. a good explanation (and pseudocode) of the algorithm can be found here.
Jun 30, 2011 · 1 minute read · Comments
dstar (well, death star as @wnafee chose to name it instead) is a simple puzzle game from the ti days. i posted a link to an html5 version a few days ago, and today, we’re releasing an ad-supported android version (just for fun). it was done by @wnafee and i.
it’s simple, but challenging - if you like puzzle games, try it out and see if you can beat all the 32 levels! you can find it on the android market.
here’s a screenshot of the level selector and another of the game play. graphics by @somaiagabr. levels come partially from the ti83 version and partially from gstar. as far as i know, the game was originally made on the ti by joe w, although i think there’s also an hp48 version somewhere as well.