Skip to content

Instantly share code, notes, and snippets.

View davidrhoden's full-sized avatar

David Rhoden davidrhoden

View GitHub Profile
@davidrhoden
davidrhoden / # mysql - 2021-12-06_13-22-37.txt
Created December 7, 2021 21:56
mysql on macOS 12.0 - Homebrew build logs
View # mysql - 2021-12-06_13-22-37.txt
Homebrew build logs for mysql on macOS 12.0
Build date: 2021-12-06 13:22:37
@davidrhoden
davidrhoden / keybase.md
Created September 2, 2020 16:25
keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am davidrhoden on github.
  • I am davidrhoden (https://keybase.io/davidrhoden) on keybase.
  • I have a public key ASBmBPnHsUYz9PUs1Zs5Sn20RvbdYYrheUdX5DrjoX2VjAo

To claim this, I am signing this object:

View anmshows.js
var anmshows = [{
city: "St. Petersburg",
radius: 10,
date: "08/28/2004",
lon: 82.62,
lat: 27.75,
venue: "The Emerald"
}, {
city: "New Orleans",
radius: 10,
@davidrhoden
davidrhoden / gist:4113f9eca0204efea3cf
Created April 20, 2015 04:25
first attempt at editing a vagrant config file
View gist:4113f9eca0204efea3cf
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
vagrant box add hashicorp/precise32
View gist:7126267
where the partial is called:
<ul class="user_avatars">
<%= render :partial => 'users/user_avatar', collection: @users %>
<%= render @users %>
</ul>
_user_avatar.html.erb:
<li>
View gist:6642039
.view-front-page-blocks
table tbody tr td
padding: 0 20px 20px 0
a
color: $darkgreen
.grid-item
.views-field-title
font-family: $sans
font-size: 18px
font-weight: bold
View gist:4253671
var render = function (data) {
var portfolio = '<% _.each(data, function(project,index) { %><div id="<%= project.iimage %>" class="anImage <%= (index)== 0 ? "active visible" : "hidden" %>"><a class="lightbox" href="/images/lightboxed/<%= project.iimage %>"> <img src="/images/<%= project.iimage %>" width="844"></a><div class="explanatory_copy"><div class="project_name"><%= project.pproject_name %></div><div class="project_subtitle"><%= project.pproject_subtitle %></div><div class="description"><p><%= project.pproject_desc %></p></div><div class="link_to_more"><a href="<%= project.iproject %>" rel="address:/<%= project.iproject %>"><%= project.ilink_to_more_copy %></a></div><div class="description_more"><p><%= project.iimagedesc %></p></div></div></div> <% }); %>';
var p_id = 4; //this will be a changing value when the filter works
var selectedProject = _.filter(data, function(p_id){ return data.iproject === p_id } );
console.log(p_id, data, 'selectedProject:', selectedProject); // returns p
@davidrhoden
davidrhoden / gist:4080006
Created November 15, 2012 17:39
why doesn't the code in $.each run?
View gist:4080006
$(document).ready(function(){
var width = 740;
console.log(width);
$.each($('.overview img'), function(i, img) {
width += $(img).width();
console.log($('.overview img'), width);
});
$('.overview').width(width);
console.log(width);
});
@davidrhoden
davidrhoden / gist:3866619
Created October 10, 2012 16:12
sample JSON
View gist:3866619
[{"iimage":"GHI_Mothers2.jpg","iproject":"5","ilink_to_more_copy":"","iimage_name":"","iimage_desc":"GHI Physicians are the types of professionals that can do anything and go anywhere they choose in life. The Mothers Campaign captures the emotion during those once-in-a-lifetime events when their children make them prouder than they ever could have ever imagined. In this campaign, those momentous occasions happen to correspond directly with the choice they make to become part of the GHI Health Insurance Network. In 2007, GHI merged with HIP to form EmblemHealth. \r\n","pproject_name":"Mothers Campaign","pproject_subtitle":"","pproject_webname":"ghi","pproject_desc":"GHI Physicians are the types of professionals that can do anything and go anywhere they choose in life. The Mothers Campaign captures the emotion during those once-in-a-lifetime events when their children make them prouder than they ever could have ever imagined. In this campaign, those momentous occasions happen to correspond directly with the cho
@davidrhoden
davidrhoden / gist:3866532
Created October 10, 2012 15:57
all values are coming out 'undefined'
View gist:3866532
var projectsJSON = $.getJSON( 'jsondata.json', function() {
alert("success" + projectsJSON.responseText); //this returns the JSON, pretty sure it is well-formed
});
var portfolio = '<% _.each(projectsJSON, function(projects,index) { %><div id="<%= projects.iimage %>" class="anImage <%= (index)== 0 ? "active visible" : "hidden" %>"><a class="lightbox" href="/images/lightboxed/<%= projects.iimage %>"> <img src="/images/<%= projects.iimage %>" width="844"></a><div class="explanatory_copy"><div class="project_name"><%= projects.pproject_name %></div><div class="project_subtitle"><%= projects.pproject_subtitle %></div><div class="description"><p><%= projects.pproject_desc %></p></div><div class="link_to_more"><a href="<%= projects.iproject %>" rel="address:/<%= projects.iproject %>"><%= projects.ilink_to_more_copy %></a></div><div class="description_more"><p><%= projects.iimagedesc %></p></div></div></div> <% }); %>';
var templateOutput = _.template(portfolio, { projects : projectsJ