This file contains hidden or 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
<?php | |
$this->packages->to_xml(array('lamda' => function($key, $value){ | |
switch($key) { | |
case 'user_id': | |
return array("username", User::find($value)->username); | |
break; | |
default: | |
return array($key, $value); | |
break; | |
} |
This file contains hidden or 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
[thorn:~] sdavis% port install php5 +apache +mysql | |
MacPorts running without privileges. You may be unable to complete certain actions (eg install). | |
---> Computing dependencies for php5 | |
MacPorts running without privileges. You may be unable to complete certain actions (eg install). | |
MacPorts running without privileges. You may be unable to complete certain actions (eg install). | |
---> Fetching expat | |
---> Attempting to fetch expat-2.0.1.tar.gz from http://internap.dl.sourceforge.net/expat | |
MacPorts running without privileges. You may be unable to complete certain actions (eg install). | |
---> Verifying checksum(s) for expat | |
MacPorts running without privileges. You may be unable to complete certain actions (eg install). |
This file contains hidden or 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
/** | |
* Sets the audio file from which the data-stream will be generated of. | |
* | |
* @param audioFileURL The location of the audio file to use | |
* @param streamName The name of the InputStream. if <code>null</code> the complete path of the audio file will be | |
* uses as stream name. | |
*/ | |
public void setAudioFile(URL audioFileURL, String streamName) { | |
// first close the last stream if there's such a one | |
if (dataStream != null) { |
This file contains hidden or 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
#factories file | |
require 'factory_girl' | |
#Menus | |
Factory.define :appitizers, :class => Menu do |f| | |
f.title "Appitizers" | |
end | |
This file contains hidden or 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 csrf_meta_tag | |
out = '' | |
out << tag(:meta, :name => 'csrf-token', :content => form_authenticity_token) | |
out << tag(:meta, :name => 'csrf-param', :content => 'authenticity_token') | |
end |
This file contains hidden or 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
class MenuLoader | |
CUP = 'Cup' | |
BOWL = 'Bowl' | |
CATEGORIES = ["Appitizers", "Soups", "Salads", "Burgers", "Sandwiches & Submarines", "Seafood Favorites", "Chicken Sandwiches", "Beverages", "Kids"] | |
def self.appetizers | |
menu = self.create_menu("Appitizers") do |menu| |
This file contains hidden or 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
var Waterfall = function(container, test_mode) { | |
var self = {test_mode:true, timer:null, data:[], ajax_url:'get_data.php'}; | |
self.init = function(container, test_mode) { | |
self.container = jQuery(container); | |
self.clear_contents(); | |
self.init_timers(); | |
return self; | |
}; | |
self.clear_contents = function() { |
This file contains hidden or 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
poopsocks:test sdavis$ RAILS_ENV=test rake hydra:units | |
(in /Users/sdavis/Work/collab) | |
Hydra Testing [> ] 0/12 | |
creating sqlite in memory database | |
creating sqlite in memory database | |
Hydra Testing [##############################>] 12/12 |
This file contains hidden or 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
require 'rubygems' | |
require 'httparty' | |
file = File.join("E:", "Program Files", "Sony", "EverQuest", "Logs", "eqlog_Stairs_project1999.txt") | |
f = File.open(file,"r") | |
f.seek 0 , IO::SEEK_END | |
def split_string_and_filter_auctions(string) | |
if string =~ /^\[(.+)\](.+)/ | |
string = {:time => $1, :message => $2} |
This file contains hidden or 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
function remove_ck_instances() { | |
$.each(CKEDITOR.instances, function(instance) { | |
CKEDITOR.remove(CKEDITOR.instances[instance]); | |
}); | |
} |