Skip to content

Instantly share code, notes, and snippets.

View scottdavis's full-sized avatar

Scott Davis scottdavis

View GitHub Profile
<?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;
}
[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).
/**
* 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) {
#factories file
require 'factory_girl'
#Menus
Factory.define :appitizers, :class => Menu do |f|
f.title "Appitizers"
end
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
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|
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() {
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
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}
function remove_ck_instances() {
$.each(CKEDITOR.instances, function(instance) {
CKEDITOR.remove(CKEDITOR.instances[instance]);
});
}