This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<------- View randoms/add.ctp --------> | |
<?php | |
echo $this->Form->create('Random'); | |
echo $this->Form->input('Random.start_time', | |
array( | |
'type' => 'time', | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scgi_port = localhost:5000 # This configures the bind address and port that ruTorrent will communicate with rTorrent on | |
# Directory Configuration | |
directory = /mnt/Storage/rtorrent/torrents # This directory is the directory to save the data of the torrent to | |
schedule = watch_directory,5,5,load_start=/mnt/Storage/rtorrent/watch/*.torrent # This sets up a watch directory to watch for .torrent files | |
session = /mnt/Storage/rtorrent/session/ # This directory is the location to store session data and is required for DHT | |
# Connection Settings | |
ip = your_ip # The IP address to report to the tracker. Without this, other users that found you through the tracker can't connect to you. | |
min_peers = 40 # Sets the desired minimum number of peers for each torrent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Basically this starts rtorrent on a screen session | |
# The only important thing to note is the rtorrent_user and rtorrent_group. They are the user and group respectively that rTorrent is started with. If you set these to the user and group you use for the file shares in Freenas you shouldn't have trouble with accessing torrents started by rTorrent through the share. | |
. /etc/rc.subr | |
name=rtorrent | |
rcvar=rtorrent_enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("button_to_click").addEventListener("click", function anon(event) { | |
this.removeEventListener("click", anon, false); | |
var mobi_button = document.getElementById("element_to_append_to"); | |
var new_div = document.createElement("div"); | |
new_div.appendChild(document.createTextNode("Please wait while we prepare the book for you.")); | |
mobi_button.appendChild(new_div); | |
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# Where file_path is path + filename, no extension | |
def convert_file(file_path): | |
if os.path.exists(file_path + ".mobi"): | |
#skip | |
else: | |
#convert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nav_link_to(title, url, options={}) | |
li_options = {} | |
if matches_options?(options) | |
li_options[:class] = "active" | |
end | |
content_tag :li, li_options do | |
link_to title, url | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.unique = function(a){ | |
return function(){ | |
return this.filter(a) | |
} | |
}(function(a,b,c){ | |
return c.indexOf(a,b+1)<0 | |
}); | |
Array.prototype.unique = function() { | |
return this.filter(function(a,b,c) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Returns true if the "X-Requested-With" header contains "XMLHttpRequest" | |
# (case-insensitive). All major JavaScript libraries send this header with | |
# every Ajax request. | |
def xml_http_request? | |
@env['HTTP_X_REQUESTED_WITH'] =~ /XMLHttpRequest/i | |
end | |
alias :xhr? :xml_http_request? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<specializations> | |
<specialization> | |
<type>being awesome</type> | |
<doctors> | |
<doctor> | |
<name>Dan Fox</name> | |
</doctor> | |
<doctor> | |
<name>Nikki Rodriguez</name> | |
</doctor> |
OlderNewer