Skip to content

Instantly share code, notes, and snippets.

View adam8810's full-sized avatar

Adam Booth adam8810

  • Oklahoma City
View GitHub Profile
@adam8810
adam8810 / gist:5423049
Created April 19, 2013 20:36
Email Friendly
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body style="font-family: arial">
<h1 style="font-family: 'Arial Black'"><?php echo $task_name; ?> Completed</h1>
<table style="border:1px solid #999; padding:2px">
<tr style="background: #333; color: #FFF;">
<td style="padding:5px;border-right:1px solid #999;border-bottom:1px solid #999;"><strong>Location:</strong></td>
@adam8810
adam8810 / gist:5417000
Created April 18, 2013 23:28
Select2 Events
$('#add_to_list').on('change', function($e) {
if ($e.added !== undefined) {
$.ajax({
url: '/api/add_to_list.json',
data: {list_id: $e.added.id, movie_id: $id, user_id: $user_id},
success: function() {
add_notify($movie_title, $e.added.text, $poster);
}
});
}
$(data.cast).each(function($index)
{
// Set defaults
$profile_path = "/assets/img/missing_" + (($index % 5) + 1) + ".png";
$position_offsets = "";
// Check to see if image exists
if(this.profile_path != null)
{
$profile_path = "http://cf2.imgobject.com/t/p/w185" + this.profile_path;
url = '/api/movie.json/' + $id;
$.ajax({
url: url,
success: function(data)
{
$(data.cast).each(function($index)
{
// pseudocode in php
echo "this is the title" . data.name;
@adam8810
adam8810 / Array-Digging-Question
Created September 7, 2012 18:15
Array Digging
This is the array that I'd be digging into.
array(
"results" => array(
"list" => array(
"content" => "content stuff"
)
)
)
This is my code and I think it's really ugly in it's current state. I'm trying to get the info in "content":