Testing something with public gists.
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
# System-wide .profile for sh(1) | |
if [ -x /usr/libexec/path_helper ]; then | |
eval `/usr/libexec/path_helper -s` | |
fi | |
if [ "${BASH-no}" != "no" ]; then | |
[ -r /etc/bashrc ] && . /etc/bashrc | |
fi |
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
/* | |
Developed by Kevin L. Hopkins (http://kevin.h-pk-ns.com) | |
You may borrow, steal, use this in any way you feel necessary but please | |
leave attribution to me as the source. If you feel especially grateful, | |
give me a linkback from your blog, a shoutout @Devneck on Twitter, or | |
my company profile @ http://wearefound.com. | |
/* Expects parameters of the directory name you wish to save it under, the url of the remote image, | |
and the Image View Object its being assigned to. */ | |
cachedImageView = function(imageDirectoryName, url, imageViewObject) |
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
cachedImageView = function(basedir, uri, obj, attr, cacheage) { | |
/** | |
Appcelerator Titanium ImageView /w cache | |
This function attempts to cache a remote image and then returns it again | |
when it's requested. | |
The file is stored in a directory "basedir," this is to try and help | |
you keep files unique. It's not special or magical, but not dirty either. |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<title>Nav CSS Generator of Awesomeness</title> | |
</head> | |
<body> | |
<!-- Developed by Kevin L. Hopkins (http://kevin.h-pk-ns.com) | |
You may borrow, steal, use this in any way you feel necessary but please | |
leave attribution to me as the source. If you feel especially grateful, |
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
require 'spec_helper' | |
describe "schedule" do | |
describe "file" do | |
it "should be present and named correctly" do | |
expect { | |
File.exists?("#{Rails.root}/config/schedule.rb") | |
}.to be_true | |
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
require 'rest-client' | |
response = JSON.parse(RestClient.get("http://api.npr.org/query?id=10001&fields=title,teaser,audio,artist&requiredAssets=audio&dateType=story&sort=dateDesc&output=JSON&numResults=20&apiKey=MDE4ODc1MDMwMDE0MjkxNDI3MDc0NTgzNg001")) | |
stories = {} | |
response["list"]["story"].each_with_index do |story, index| | |
stories[index + 1] = { | |
title: story['title']['$text'], | |
audio_file: story['audio'].first['format']['mp3'].first['$text'] | |
} |
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 Downloader | |
attr_accessor :stories, :selection | |
def initialize(selection = nil, stories) | |
self.stories = stories | |
self.selection = selection | |
end | |
def current_story | |
stories[selection - 1] |
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
describe '#transactions' do | |
before(:all) do | |
@relationship_1 = create(:marriage) | |
@user = @relationship_1.user | |
@partner = @relationship_1.partner | |
@relationship_2 = create(:marriage, user: @partner, partner: @user) | |
@user_personal_private = create(:account, user: @user, ownership: 'personal', visibility: 'private') | |
@user_personal_viewable = create(:account, user: @user, ownership: 'personal', visibility: 'viewable') | |
@user_shared = create(:account, user: @user, ownership: 'shared') |
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
namespace :client do | |
desc 'Start the client React app development server' | |
task start: [:environment] do | |
system_command "#{env_vars} yarn start" | |
end | |
# Send the value to the client | |
def client_env_vars | |
%w[ | |
GOOGLE_ANALYTICS_ID |
OlderNewer