This file contains 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
/* | |
Author: John Otander | |
For: BSU CS 297 | |
Date: 3/12/2014 | |
Run Program: $ gcc godot.c -ogodot | |
$ ./godot <ALARM_INTERVAL> | |
*/ | |
#include <stdlib.h> |
This file contains 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
unless Rails.env.development? || Rails.env.test? | |
config.action_mailer.default_url_options = { :host => 'www.myappurl.com' } | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:enable_starttls_auto => true, | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => "gmail.com", | |
:authentication => :login, |
This file contains 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
window.chosen_select = | |
enable: -> | |
$('.chosen-select').chosen | |
allow_single_deselect: true | |
no_results_text: 'No results found' | |
width: '100%' | |
add: (select, string) -> | |
select.prepend($('<option selected="selected">', { value: string }) | |
.text(string)) |
This file contains 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
#include "mystrstr.h" | |
#include <string.h> | |
#include <stdio.h> | |
char big_string[] = "Hello"; | |
char sub_string[] = "ell"; | |
char *str = big_string; | |
char *substr = sub_string; |
This file contains 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 'date' | |
2.0.0p353 :001 > require 'date' | |
=> true | |
2.0.0p353 :002 > date_str = "Mon., Feb. 10, 8 p.m" | |
=> "Mon., Feb. 10, 8 p.m" | |
2.0.0p353 :003 > DateTime.strptime(date_str, "%a., %b. %e, %l %P") | |
ArgumentError: invalid date | |
from (irb):3:in `strptime' | |
from (irb):3 | |
from /Users/johno/.rvm/rubies/ruby-2.0.0-p353/bin/irb:12:in `<main>' |
This file contains 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
~|||$ irb | |
re2.0.0p353 :001 > require 'Time' | |
=> true | |
2.0.0p353 :002 > Time.strptime("12/22/2011", "%m/%d/%Y") | |
=> 2011-12-22 00:00:00 -0700 | |
2.0.0p353 :003 > Time.strptime("12/11/2011", "%m/%d/%Y") | |
=> 2011-12-11 00:00:00 -0700 | |
2.0.0p353 :004 > Time.strptime("12/11/2011", "%d/%m/%Y") | |
=> 2011-11-12 00:00:00 -0700 | |
2.0.0p353 :005 > |
This file contains 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
shovel|||master $ irb | |
2.0.0-p353 :001 > require './boise_weekly' | |
=> true | |
2.0.0-p353 :002 > Shovel::BoiseWeekly.scrape | |
=> [#<Event:0x007fb61a178dd8 @title="Banff Mountain Film Festival", @description="", @category=1, @address="700 Idaho", @venue=nil, @bw_id="3046754", @cost="$14-$48", @date="\r\n ..."] |
This file contains 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 'colorize' | |
module Amazon | |
S3_BUCKET_NAME = ENV['S3_BUCKET_NAME'] | |
AWS_ACCESS_KEY = ENV['AWS_ACCESS_KEY'] | |
AWS_SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] | |
def self.all_keys_initialized? | |
S3_BUCKET_NAME && AWS_SECRET_ACCESS_KEY && AWS_ACCESS_KEY |
This file contains 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
# Replace me. | |
def base_subscription | |
self.subscriptions.reverse.each do |sub| | |
return sub if sub.active and sub.plan.service_type == 'standard' | |
end | |
return nil | |
end | |
# With me. | |
def base_subscription |
This file contains 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
<div class="masonry" data-masonry-element="widget" data-masonry-gutter=20> | |
<!-- ... --> | |
</div> |