Skip to content

Instantly share code, notes, and snippets.

View scytacki's full-sized avatar

Scott Cytacki scytacki

  • Concord Consortium
  • Medford, MA
View GitHub Profile
@scytacki
scytacki / survey-cleaner.gs
Last active February 8, 2017 17:54 — forked from kjola8/survey-cleaner.gs
Google Spreadsheet script to convert survey answers to numbers.
/*
The goal is to identify each column for the type that is
and then convert the cells to numbers.
To identify it, we need to ignore the first few rows which will be headers.We could probably be safe and just skip the first
4 rows and start there.
*/
function getUnique_(values) {
var o = {}, a = [], i, e;
@scytacki
scytacki / survey-cleaner.gs
Last active February 8, 2017 18:06
Google Spreadsheet script to convert survey answers to numbers.
/*
The goal is to identify each column for the type that is
and then convert the cells to numbers.
To identify it, we need to ignore the first few rows which will be headers.We could probably be safe and just skip the first
4 rows and start there.
*/
function getUnique_(values) {
var o = {}, a = [], i, e;
deploy@ip-10-0-2-52:/web/portal/current$ NEW_RELIC_DISPATCHER=delayed_job RAILS_ENV=production bundle exec script/delayed_job run --prefix /web/portal/current
loading version from version.yml
delayed_job: process with pid 12622 started.
/usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping keys are not allowed in this context at line 28 column 11 (Psych::SyntaxError)
from /usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /usr/local/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /usr/local/lib/ruby/1.9.1/psych.rb:127:in `load'
from /web/portal/shared/bundle/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:84:in `payload_object'
from /web/portal/shared/bundle/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:71:in `name'
from /web/portal/shared/bundle/ruby/1.9.1/gems/delayed_job-3.0.3/lib/delayed/worker.rb:230:in `handle_failed_job'
@scytacki
scytacki / report.json
Created March 10, 2016 22:03
Example report api response
{
"report": {
"id": 765,
"type": "Activity",
"name": "HAS Activity Dashboard Test 2",
"children": [
{
"id": 2093,
"type": "Section",
"name": "HAS Activity Dashboard Test 2 Section",
@scytacki
scytacki / trace.txt
Created February 23, 2016 20:01
Error when exporting a sequence
A NoMethodError occurred in sequences#export:
undefined method `id' for nil:NilClass
app/services/lara_serialization_helper.rb:24:in `key'
-------------------------------
Request:
-------------------------------
A ActionView::Template::Error occurred in external_activities#edit:
undefined method `has_role?' for nil:NilClass
app/views/external_activities/_form.html.haml:34:in `block (2 levels) in _app_views_external_activities__form_html_haml___2532007193654664101_95884160'
-------------------------------
Request:
-------------------------------
* URL : https://learn.concord.org/eresources/103/edit
A NameError occurred in external_activity_data#create:
undefined local variable or method `verify_request_is_peer' for #<Dataservice::ExternalActivityDataController:0x00000008a28958>
app/controllers/dataservice/external_activity_data_controller.rb:10:in `can_create'
-------------------------------
Request:
-------------------------------
* URL : https://learn.staging.concord.org/dataservice/external_activity_data/174
@scytacki
scytacki / curl-post.sh
Last active September 15, 2015 20:37
Example of posting file to shutterbug
echo "content="$(cat post-content-test.html | python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())') | curl 'http://snapshot.concord.org/shutterbug/make_snapshot' -H 'Origin: http://concord-consortium.github.io' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8,es-419;q=0.6,es;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://concord-consortium.github.io/lara-interactive-api/' -H 'Connection: keep-alive' --data 'css=%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fapp.css%22%3E&width=500&height=400&base_url=http%3A%2F%2Fconcord-consortium.github.io%2Flara-interactive-api%2F&format=png&quality=1' --data @-
@scytacki
scytacki / gist:0325156297b7404d4f57
Created September 8, 2015 20:48
exception when activating
I got this exception when activating the license '1 year Expiring (expiring on 5/24/2016)' from the Fathom Test License Keys document.
Process: FathomFull [35240]
Path: /Applications/Fathom 2.4/Fathom.app/Contents/MacOS/FathomFull
Identifier: org.concord.fathom
Version: Fathom 2.4 (2.40)
Code Type: X86 (Native)
Parent Process: launchd [356]
Responsible: FathomFull [35240]
echo "content="$(cat post-content.html | python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())') | curl 'http://snapshot.concord.org/shutterbug/make_snapshot' -H 'Origin: http://concord-consortium.github.io' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8,es-419;q=0.6,es;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://concord-consortium.github.io/lara-interactive-api/' -H 'Connection: keep-alive' --data 'css=%3Clink+rel%3D%22stylesheet%22+href%3D%22css%2Fapp.css%22%3E&width=500&height=400&base_url=http%3A%2F%2Fconcord-consortium.github.io%2Flara-interactive-api%2F&format=png&quality=1' --data @-