Skip to content

Instantly share code, notes, and snippets.

View hannahwhy's full-sized avatar

Hannah Yip hannahwhy

View GitHub Profile
@hannahwhy
hannahwhy / lookup.js
Created January 8, 2014 00:49
Bookmarklets to look up and save a page in the Internet Archive's Wayback Machine
javascript:(function(){window.open('https://web.archive.org/web/*/'+(''+window.location));})();
http://Марко-Савицький.zapd.com/--------127
http://うきもん.zapd.com/-----------------3
http://ki_to.zapd.com/2013-5-8
http://Костя-Кудряшов.zapd.com/test484
http://Дима-Швайа.zapd.com/--fobas--
http://もげもげ.zapd.com/----56
http://野中孝郎.zapd.com/--------209
http://azoe_killa.zapd.com/hollow-point-family
http://ابو-محمد0.zapd.com/jan-01-471210471
http://お米.zapd.com
http://www.st.com/web/catalog/tools/FM147/CL1794/SC1807/SS1747/PF210567
@hannahwhy
hannahwhy / mine.xml
Created September 18, 2013 00:28
My Qt Creator C++ indentation style
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorCodeStyle>
<!-- Written by QtCreator 2.7.2, 2013-09-17T19:27:37. -->
<qtcreator>
<data>
<variable>CodeStyleData</variable>
<valuemap type="QVariantMap">
<value type="bool" key="AlignAssignments">false</value>
<value type="bool" key="AutoSpacesForTabs">false</value>
<value type="bool" key="BindStarToIdentifier">false</value>
@hannahwhy
hannahwhy / gist:6015462
Created July 16, 2013 21:50
Instrument -> Warehouse stuff
From d8daabd5dd370ee6d262888756233c0aca1443c9 Mon Sep 17 00:00:00 2001
From: David Yip <yipdw@member.fsf.org>
Date: Tue, 16 Jul 2013 21:44:34 +0000
Subject: [PATCH] A spec to demonstrate an issue with question fill-ins.
Related data issues:
* https://code.bioinformatics.northwestern.edu/redmine/issues/show/9680
* https://code.bioinformatics.northwestern.edu/redmine/issues/show/9697
(maybe)
#!/usr/bin/env ruby
if ARGV.length < 2
puts "Usage: #$0 [DIRECTORY] [GOAL FILE]"
exit 1
end
values = {}
files = []
#: kitchen_sink_survey.rb:2
msgid "Kitchen Sink survey"
msgstr ""
#: kitchen_sink_survey.rb:3
msgid "Basic questions"
msgstr ""
#: kitchen_sink_survey.rb:5
msgid "These questions are examples of the basic supported input types"
msgstr ""
#: kitchen_sink_survey.rb:8
diff --git a/Gemfile b/Gemfile
index ce1b006..947c8ca 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.10'
+gem 'rails', '3.0.19'
require 'openssl'
require 'securerandom'
require 'base64'
HM_KEY = "5\xC1\x16\x80\xA2HS\xC2\xFBX\x15\x9D\x1Dp\x9Dj\x11h\xDD\x9B\xF4|Q4\xFB\xEE7\xEE\x1E@\xFD\xFC"
MK_KEY = "\xBC\x7F?\x96w\xD7RM|\v%\xB3\x93\x95\xD8\xDD\xC6\xFB\xD1\xA9=\xAF\x7F\xD5\b\x1AU4\xC1\x05t\x89"
def issue(user, time_delta)
mac_key, enc_mac_key, iv = gen_mac_key
diff --git a/app/models/response.rb b/app/models/response.rb
index c657a5f..531577f 100644
--- a/app/models/response.rb
+++ b/app/models/response.rb
@@ -29,8 +29,10 @@ class Response < ActiveRecord::Base
include Surveyor::Models::ResponseMethods
##
- # Used by {#value=} to recognize datetimes.
+ # Used by {#value=} to recognize datetimes, dates, and times.