Skip to content

Instantly share code, notes, and snippets.

tell application "Rdio"
set c to current track
set x to artist of c & " - " & name of c & " [" & album of c & "]"
end tell
tell application "Growl"
set the allNotificationsList to {"Rdio Helpers"}
set the enabledNotificationsList to {"Rdio Helpers"}
register as application "Rdio Helpers" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Rdio.app"
notify with name "Rdio Helpers" title "Now Playing" description x application name "Rdio Helpers" priority 0 without sticky
end tell

Keybase proof

I hereby claim:

  • I am vhata on github.
  • I am vhata (https://keybase.io/vhata) on keybase.
  • I have a public key whose fingerprint is E559 364E 00D2 336D 1066 B798 5510 3563 62F2 793D

To claim this, I am signing this object:

Heading here

  • list one
  • two
  • there

Another heading

  • here we go

Heading here

  • list one
  • two
  • there

Another heading

  • here we go
tell application "Google Chrome"
repeat with t in tabs of windows
tell t
if URL starts with "http://mixes.dabears.ca" then
execute javascript "x=document.getElementsByName('media')[0];if(x.paused){x.play()}else{x.pause()}"
exit repeat
end if
end tell
end repeat
end tell
@vhata
vhata / gist:1186461
Created September 1, 2011 15:47 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away

Day job:

I am Operations Team Leader at Yola.com. We are a small team of four guys who are currently doing a complete re-platform to get rid of all the technical debt that has built up in the last three years. We're moving our code from svn to git, using chef on all our machines, and re-architecting all the services, and it's pretty exciting.

Favorite Python project:

Currently celery, the Distributed Task Queue (http://ask.github.com/celery/index.html). I'm replacing a lot of old crufty ways of running periodic jobs and getting background tasks done (sending to SQS, and then having a cron job sit and munch through the queue, for example) with a simple system of celery tasks. This way, each of our services can fire off a request to any one of the others that will get queued and dealt with at the target service's leisure, but we can also bring up a cluster of generic workers that can handle all of our other task requirements. I might be a little too starry-eyed about it

@vhata
vhata / tomcat-attributes-default.rb
Created October 31, 2011 13:45
Tomcat Chef recipe
default[:tomcat][:standalone] = false
default[:tomcat][:port] = 8009
default[:tomcat][:timeout] = 30
default[:tomcat][:default_host] = 'localhost'
# java options
default[:tomcat][:java_opts] = []
# listeners handle events across the server. The following are defaults
# which will probably be enough. The jasper listener will be needed where jsp
@vhata
vhata / gist:1380719
Created November 20, 2011 19:09
On the fly method-caller
try:
m = imp.load_source(f,'%s/%s/deploy/%s.py' % (workspace_path, self.application.name, f))
log.debug("Successfully imported module")
except IOError:
log.error("Could not find %s's deploy script" % self.application.name)
raise Exception('Could not import %s/%s/deploy/%s.py' % (workspace_path, self.application.name, f))
try:
func = getattr(m,f)
except:
log.error("Failed to call function %s" % f)
23:14/0 [jonathan@nitesca] ~/Desktop/talitha/Unformatted-pages1&2 $ dig +trace A staging.payu.co.za @a.gtld-servers.net
; <<>> DiG 9.7.3-P3 <<>> +trace A staging.payu.co.za @a.gtld-servers.net
;; global options: +cmd
. 518400 IN NS f.root-servers.net.
. 518400 IN NS g.root-servers.net.
. 518400 IN NS h.root-servers.net.
. 518400 IN NS i.root-servers.net.
. 518400 IN NS j.root-servers.net.
. 518400 IN NS k.root-servers.net.
I want to do one on "Scaling GitHub". It'll be part scaling on a technical level, and part scaling on a business level.
Here's a short little abstract to give you a little idea:
---
A month after launching, GitHub hosted one thousand repositories. Three years later, we host over three million. In the same time we've gone from one thousand users to over a million.
This type of scaling presents some interesting technical challenges. I'll dig into our development workflow and how we address concepts like scaling, deployment, code review, and testing.
It also presents some interesting business challenges, too. How you grow your company from three employees, how you work in teams, and how you split your app up into services all help ensure that you'll be able to react to your product's growth.