Skip to content

Instantly share code, notes, and snippets.

View chrislerum's full-sized avatar

Chris Lerum chrislerum

View GitHub Profile
notification :tmux,
:display_message => true,
:timeout => 5,
:default_message_format => '%s >> %s',
:color_location => 'status-right-bg'
<soap:Envelope xmlns="http://www.w-w-i-s.com/hb/51" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >
<soap:Header>
<Credentials>
<HMac>string</HMac>
<ClientID>AHHRV</ClientID>
<UserName>ariel1234</UserName>
<Password>worldwide1</Password>
</Credentials>
</soap:Header>
<soap:Body>
require 'rubygems'
gem 'savon', '=1.1.0'
require 'savon'
WSDL_URL = "https://testenv.w-w-i-s.com/hb/51/api.asmx?wsdl"
HMAC = 'string'
CLIENT_ID = 'AHHRV'
MAIN_HEADER = {
'Credentials' => {
'HMac' => HMAC,
@chrislerum
chrislerum / gist:5277179
Created March 30, 2013 15:48
output for `rake db:reset` - crashing on this line in seeds file (trying to notify client?) patient.bp_readings.create(systolic: 120, diastolic: 80, reading_time: Time.now, pulse: 60)
rake aborted!Real HTTP connections are disabled. Unregistered request: POST http://api.pusherapp.com/apps/40289/events?auth_key=8c6d474dc6ecd0cdba44&auth_signature=8d8db02c047c6b42e1edaed0833e3477ce2e593f65fd7c4f0c205d6eb73d1494&auth_timestamp=1364658067&auth_version=1.0&body_md5=e35531fa26834340beca8b09a3e2fc55 with body '{"name":"created","channels":["patient_1_bpReading"],"data":"{\"id\":1,\"systolic\":120,\"diastolic\":80,\"reading_time\":\"2013-03-30T15:41:07Z\",\"risk_threshold\":{\"risk\":3,\"message\":\"Normal\",\"extended_message\":\"Your Blood Pressure is Normal. Your blood pressure will change a little over your whole pregnancy. This is perfectly normal. The pregnancy hormone progesterone relaxes the walls of your blood vessels. This may make your blood pressure fall during your first and second trimesters. This lower blood pressure may make you feel faint if you stand for too long or get up quickly. \"},\"pulse\":60}"}' with headers {'Accept'=>'*/*', 'Content-Type'=>'application/json', 'User-Agent
Teacup::Stylesheet.new :base do
style UILabel,
backgroundColor: :firebrick.uicolor(0.60),
top: 100,
left: 100,
width: 200,
height: 100,
textColor: :white.uicolor,
textAlignment: :center.uialignment,
font: :bold.uifont(30)
test only
motion app, with bubble-wrap, sugarcube et al.
# this works, takes 10 secs to slide over
def viewDidLoad
self.view.slide :left, {duration: 10}
end
# but I'd like it to slide when I pan, but the below just instantly removes the view, no animation.
def viewDidLoad
self.view.whenPanned do
@chrislerum
chrislerum / rules.md
Created September 15, 2012 18:00 — forked from radar/rules.md

Asking questions, the right way

When asking questions in the #rubyonrails channel, please follow these 12 simple rules. Can't count that high? The first 7 will get you in most people's good books.

  1. Do your research beforehand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
  3. Clearly explain what is happening and create a Gist (http://gist.github.com) or Pastie (http://pastie.org) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces. A "Full Trace" as opposed to the default "Application Trace" is preferred. NO FAKE CODE. If you're under an NDA, we cannot help you with your problem. Go hire a consultant.
  4. **Do not use any service that is not Pastie or Gist
style
- should assign any random property that works - should convert left/top/width/height into frame
- should assign any random property that works on the layer
- should warn about unknown thingies2012-09-14 11:40:30.985 teacup[10554:c07] TEACUP WARNING: Can't apply "setPartyTime:" or :partyTime= to #<UILabel:0xe2f9840>
2012-09-14 11:40:30.987 teacup[10554:c07] TEACUP WARNING: Can't apply "setPartyTime:" or :partyTime= to #<UILabel:0xe2f9840>
[MISSING]
Bacon::Error: 20.0.==(0) failed
spec.rb:553:in `satisfy:': Application 'Teacup' - root view should be styled as 'root'
spec.rb:567:in `method_missing:'
@chrislerum
chrislerum / teacup_out.txt
Created September 14, 2012 14:37
rake spec teacup
==[~/code/rubymotion_apps]
git clone https://github.com/rubymotion/teacup.git
Cloning into 'teacup'...
remote: Counting objects: 1911, done.
remote: Compressing objects: 100% (814/814), done.
remote: Total 1911 (delta 1003), reused 1888 (delta 984)
Receiving objects: 100% (1911/1911), 283.82 KiB, done.
Resolving deltas: 100% (1003/1003), done.