Skip to content

Instantly share code, notes, and snippets.

View mvastola's full-sized avatar

Mike Vastola mvastola

View GitHub Profile
@mvastola
mvastola / gist:810777
Created February 4, 2011 05:29
CDS Diff
Index: calendar_date_select/calendar_date_select.js
===================================================================
--- calendar_date_select/calendar_date_select.js (revision 1369)
+++ calendar_date_select/calendar_date_select.js (revision 1370)
@@ -296,7 +296,7 @@
this.year_select.setValue(y);
} else {
- this.month_year_label.update( Date.months[m] + " " + y.toString() );
+ this.month_year_label.update().insert( Date.months[m] + " " + y.toString() );
@mvastola
mvastola / gist:810780
Created February 4, 2011 05:31
CDS Working in IE
// CalendarDateSelect version 1.16.1 - a prototype based date picker
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");
Element.addMethods({
purgeChildren: function(element) { $A(element.childNodes).each(function(e){$(e).remove();}); },
build: function(element, type, options, style) {
var newElement = Element.buildAndAppend(type, options, style);
element.appendChild(newElement);
require 'dalli'
module App
class Settings
class << self
attr_accessor :cache_ttl, :fetch_timeout, :fetch_attempt_interval
end
end
@mvastola
mvastola / footnotes.tex
Created May 28, 2012 05:13
Footnote Numbers Without Superscript
\documentclass[letterpaper,landscape]{article}
\usepackage[margin=0.25in]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{ifthen}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{footnote}
\usepackage[flushmargin]{footmisc}
\pagestyle{empty}
@mvastola
mvastola / footnotes.tex
Created May 28, 2012 05:14
Footnote Numbers Without Superscript
\documentclass[letterpaper,landscape]{article}
\usepackage[margin=0.25in]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{ifthen}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{footnote}
\usepackage[flushmargin]{footmisc}
\pagestyle{empty}
@mvastola
mvastola / wsdl-test.rb
Created June 22, 2012 21:42
Parsing Changes across Wasabi Versions
#!/usr/bin/ruby1.9.1
require 'pp'
# Current (Broken) Wasabi: 2.4.1
# Old (Working) Wasabi: 2.1.0
if !ARGV[0].nil? && ARGV[0].downcase == 'new'
gem 'wasabi', '~> 2.4.0'
else
gem 'wasabi', '2.1.1'
@mvastola
mvastola / condensed.rb
Created November 29, 2012 12:40
ActiveRecord validates_associated Issue in Rails 3.2.9
#!/usr/bin/env ruby1.9.1
require 'rubygems'
gem 'rails', '3.2.9'
gem 'sqlite3'
require "active_record/railtie"
require "active_resource/railtie"
ActiveRecord::Base.logger = Logger.new STDOUT
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'passenger', '~> 5.0.x'
end
require 'timeout'
require 'net/http'
Jul 10 18:38:38 tuftslife.com watch-github.rb[23992]: Repo: tuftslife/Bluemoon#master
Jul 10 18:38:38 tuftslife.com watch-github.rb[23992]: Has Commits? true
Jul 10 18:38:38 tuftslife.com watch-github.rb[23992]: Commit Timestamp: 2016-07-10 18:38:33 UTC
Jul 10 18:38:38 tuftslife.com watch-github.rb[23992]: Last Deploy Time: 2016-01-14 16:06:21 UTC
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: Deploying...Using airbrussh format.
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: Verbose output is being written to log/capistrano.log.
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: 00:00 git:wrapper
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: 01 mkdir -p /tmp/Production/TL-Bluemoon/
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: ✔ 01 bluemoon-production@localhost 0.001s
Jul 10 18:38:39 tuftslife.com watch-github.rb[23992]: 02 chmod +x /tmp/Production/TL-Bluemoon/git-ssh.sh
@mvastola
mvastola / rack2.diff
Created September 10, 2016 17:53
Changes in Rack 2
diff --git a/HISTORY.md b/HISTORY.md
index 2635c60..406d175 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,14 +1,162 @@
-Fri Jun 19 07:14:50 2015 Matthew Draper <[email protected]>
+Sun Dec 4 18:48:03 2015 Jeremy Daer <[email protected]>
- * Work around a Rails incompatibility in our private API
+ * First-party "SameSite" cookies. Browsers omit SameSite cookies