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
desc %{ Renders the contained block if online ordering is true} | |
tag 'location:ordering' do |tag| | |
location = tag.locals.location | |
if location.phone && %w(713 281 972 214 469 817).detect { |area_code| location.phone.start_with? area_code} | |
tag.expand | |
elsif location.title && (location.title == "San Jacinto" || location.title == "Preston Forest") | |
tag.expand | |
end | |
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
var people = { | |
brian: "Brian Wigginton", | |
denny: "Denny Cunningham" | |
}; | |
var name = "brian"; | |
alert(people.name); | |
// would alert "Brian Wigginton" | |
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
Moonshine::Application.routes.draw do | |
# Administration | |
match 'admin/automobiles/get_makes_for_year' => 'admin/automobiles#get_makes_for_year' | |
match 'admin/automobiles/get_models_for_make_and_year' => 'admin/automobiles#get_models_for_make_and_year' | |
namespace "admin" do | |
resources :automobiles | |
end | |
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 CreatePartsVehiclesJoinTable < ActiveRecord::Migration | |
def self.up | |
create_table :parts_vehicles, :id => false do |t| | |
t.integer :part_id | |
t.integer :vehicle_id | |
end | |
end | |
def self.down | |
drop_table :parts_vehicles |
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 hbolo = hbolo || {}; | |
hbolo.InputManager = function () { | |
var keyStates = { | |
forward: false, | |
reverse: false, | |
left: false, | |
right: false, |
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(window) { | |
// Constructor | |
var Interpolation = function() { | |
this.speed = 0.5; | |
this.spring = 0.5; | |
this.target = 1; | |
this.value = 0; | |
this.velocity = 0; | |
this.running = false; |
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
' original code from Ingo Rammer (http://weblogs.thinktecture.com/ingo/2011/02/attach-to-process-macro-for-visual-studio-2010.html) | |
' ===== Create the Macro ===== | |
' 1. Tools > Macros > Macro IDE | |
' 2. Right Click MyMacros > Add > Add Module | |
' 3. Paste in the code below: | |
' 4. Rename the Macro file DebuggingMacros | |
' ==== Add Macros to Debug Toolbar ==== |
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
using System; | |
using System.Web; | |
using System.Web.Mvc; | |
public abstract class SplitABController : Controller | |
{ | |
private static readonly Results results = new Results(); | |
private const string B_TEST_SUFFIX = "_B"; | |
private const string SPLIT_TEST_VIEW_COOKIE_NAME = "SPLIT_TEST_VIEW_COOKIE"; | |
private static ViewFilesCache cache; |
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
global | |
#debug # uncomment to enable debug mode for HAProxy | |
defaults | |
mode http # enable http mode which gives of layer 7 filtering | |
timeout connect 5000ms # max time to wait for a connection attempt to a server to succeed | |
timeout client 50000ms # max inactivity time on the client side | |
timeout server 50000ms # max inactivity time on the server side | |
backend legacy # define a group of backend servers to handle legacy requests |
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 | |
foreach ($visible as $destinationLink) { | |
echo | |
"<li class='selected_list_item' id=" . $destinationLink['Destination']['slug'] . "> | |
<div class='trip_info'> | |
<a href='#' class='close_list_item' rel='" . $destinationLink['Destination']['slug'] . "'>X</a> | |
<span class='insider_carousel_header'>Meet an insider</span> | |
<div> | |
<a href='TODO' class='location'>" . $destinationLink['Destination']['name'] . "</a> |
OlderNewer