This file has been truncated, but you can view the full file.
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
$(document).ready( function() { | |
//Check if america or international | |
$('#postcard_global').bind('change', function (e) { | |
if( $('#postcard_global').val() == "International") { | |
$('#internationaldiv').show(); | |
$('#americadiv').hide(); | |
} | |
else if( $('#postcard_global').val() == "America") { | |
$('#americadiv').show(); | |
$('#internationaldiv').hide(); |
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
// JSON Array of Towns.. In Rails: <%= @towns = Town.all.to_json %> | |
var TOWNS = [ | |
{ town: "Abbeville city", id: 1 }, | |
{ town: "Adamsville city", id: 2 }, | |
{ town: "Addison Town", id: 3 } | |
]; | |
$(document).ready(function() { | |
$('#postcard_city').bind('change', updateStateValue); |
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 recentpost | |
@graph = Koala::Facebook::API.new(facebook_auth.oauth_token) | |
@analytics = @graph.get_object(params[:id]) | |
@recentfeed = @graph.get_connections(params[:id], "posts") | |
if client_signed_in? | |
@clients = Client.where(:clabel => current_client.companyname) | |
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
INSERT INTO `facebooks` (`id`, `client_id`, `provider`, `uid`, `oauth_token`, `oauth_expires_at`, `created_at`, `updated_at`) | |
VALUES | |
(1, 1, 'facebook', '100004016931051', 'AAAFhSx2lxZCUBAFraQOqpXSWOEKopMChGFpl9PZBTLrbXGDI7V0CDqYtLLlk2cXH4Px90VEGHGWAi3M9LSNmCoZCIkUXgZB6Jxlh7MUTGRGcb8FGBK5A', '2012-10-10 20:00:00', '2012-10-09 21:25:46', '2012-10-10 18:20:37'); |
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
#!/usr/bin/env bash | |
msg=$1 | |
deploy=$2 | |
if [ -z "$msg" ] ; then | |
echo "Usage: push 'message'" | |
echo "Or: push 'message' deploy to cap deploy" | |
exit 1 | |
fi | |
git add . | |
git commit -m "$msg" |
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
before_filter :find_current_site | |
helper_method :current_site | |
attr_reader :current_site | |
private | |
def find_current_site | |
@current_site = Client.find_by_comurl(request.host) | |
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
respond_to do |format| | |
if @client.save | |
if @client.dash == 1 | |
format.html { redirect_to sales_prospects_path, notice: 'Prospect was successfully created.' } | |
elsif @client.employ == 1 | |
format.html { redirect_to liya_clients_show_path(@client.employer), notice: 'Employ was successfully created.' } | |
else | |
format.html { redirect_to liya_clients_show_path(@client.id), notice: 'Client was successfully created.' } | |
end | |
else |
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 new | |
@questionaire = Questionaire.new | |
1.times do | |
question = @questionaire.questions.build | |
1.times { question.answers.build } | |
end | |
respond_to do |format| | |
format.html # new.html.erb | |
format.json { render json: @questionaire } |
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
<script> | |
$(document).ready(function(){ | |
var flickrUserId = '59573034@N03'; //User Id | |
var flickrApiKey = '68dcfff9e2db6c1a901af1cc18c2e888'; | |
$.getJSON('http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=' + flickrApiKey + '&user_id=' + flickrUserId + '&format=json&jsoncallback=?', function(data){ | |
$.each(data.photos.photo, function(i,item){ | |
url = "http://farm"+ item.farm +".static.flickr.com/"+ item.server +"/"+ item.id +"_"+ item.secret +"_m.jpg"; | |
$('#photos_here').append('<li><a href="'+ url +'"><img src="'+ url +'" alt="'+ item.title +'" /></a></li>'); | |
}); |
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
// JSON Array of Towns.. In Rails: <%= @towns = Town.all.to_json %> | |
var TOWNS = [ | |
{ town: "Abbeville city", id: 1 }, | |
{ town: "Adamsville city", id: 2 }, | |
{ town: "Addison Town", id: 3 } | |
]; | |
$(document).ready(function() { | |
$('#postcard_city').bind('change', updateStateValue); |