export PIN=111111
export SIGN_KEY=11
export ENC_KEY=55
-
Create a data to sign
echo "data to sign (max 100 bytes)" > data
| { | |
| "version":2.0, | |
| "display_hints":[ | |
| { | |
| "key":"GPCAMERA_GROUP_VIDEO", | |
| "display_name":"Video Settings", | |
| "settings":[ | |
| { | |
| "setting_id":5, | |
| "widget_type":"select", |
| package main | |
| import ( | |
| "bufio" | |
| "log" | |
| "os" | |
| ) | |
| var concurrency = 100 |
| require "date" | |
| # Small DSL for idiomatic date parsing and formatting in Ruby. | |
| # https://gist.github.com/sshaw/53c27b148e903a07e494 | |
| # | |
| # Usage: | |
| # | |
| # include YYMMDD | |
| # date = Date.today | |
| # |
| xmlp |
| #!/bin/bash | |
| # | |
| # transcode-video.sh | |
| # | |
| # Copyright (c) 2013-2015 Don Melton | |
| # | |
| about() { | |
| cat <<EOF | |
| $program 5.13 of April 8, 2015 |
| -- show table and index bloat in your database ordered by most wasteful | |
| -- https://github.com/heroku/heroku-pg-extras/blob/master/init.rb | |
| WITH constants AS ( | |
| SELECT current_setting('block_size')::numeric AS bs, 23 AS hdr, 4 AS ma | |
| ), bloat_info AS ( | |
| SELECT | |
| ma,bs,schemaname,tablename, | |
| (datawidth+(hdr+ma-(case when hdr%ma=0 THEN ma ELSE hdr%ma END)))::numeric AS datahdr, | |
| (maxfracsum*(nullhdr+ma-(case when nullhdr%ma=0 THEN ma ELSE nullhdr%ma END))) AS nullhdr2 | |
| FROM ( |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # store the job before it has a chance to be served by dragonfly | |
| images.configure do |c| | |
| c.define_url do |app, job, opts| | |
| thumb = ThumbTracker.where(job: job.serialize).first | |
| unless thumb | |
| uid = job.store | |
| thumb = ThumbTracker.create!( | |
| :uid => uid, | |
| :job => job.serialize | |
| ) |
This is how I debug SystemStackError when there is no stack trace.
My first attempt was:
begin
a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
puts caller
end