Some JavaScript
// Delete confirmation modals
$('#delete-confirm').on('show', function() {
var $submit = $(this).find('.btn-danger'),
href = $submit.attr('href');
$submit.attr('href', href.replace('pony', $(this).data('id')));
#!/bin/sh | |
# | |
# | |
# Original source: http://forum.utorrent.com/viewtopic.php?id=88044 | |
# | |
# uTorrent start stop service script | |
# | |
# copy to /etc/init.d | |
# run "update-rc.d utorrent defaults" to install | |
# run "update-rc.d utorrent remove" to remove |
module MongoidTypes | |
# | |
# Store the IP Addresses as integers in MongoDB. | |
# | |
# The documents would look something like this in mongo | |
# | |
# { "_id" : ObjectId("4f8e2ea261455b704d000001"), "ip_address" : NumberLong("3232235777") } | |
# | |
# To have your model use this class simply set the type for the feild in mongoid | |
# |
angular.module('myApp', ['ngRoute']) | |
.provider('Weather', function() { | |
var apiKey = ""; | |
this.getUrl = function(type, ext) { | |
return "http://api.wunderground.com/api/" + | |
this.apiKey + "/" + type + "/q/" + | |
ext + '.json'; | |
}; |