s[tep]
-- step into next call
n[ext]
-- step over next call
l[ist] =
-- show the current line, in context. e.g.:
26 end
27 end
I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.
I can’t trust the other web apps, so I must interact with my users directly. I’ll let them know that the other app is trying to get their info, and ask whether they want to grant that permission. Oauth defines a way to initiate that permission verification from the other app’s site so that the user experience is smooth. If the user grants permission, I issue an AuthToken to the other app which it can use to make requests for that user's info.
Oauth2 has nothing to do with encryption -- it relies upon SSL to keep things (like the client app’s shared_secret) secure.
var authExpirationHandler, | |
errorHandler; | |
function catchUnauthorizedResponses(data) { | |
if (data.status === 401 && !maybeLocalStorage.getItem("token")) { | |
// ensure the in-memory session really is expired before destroying it | |
return axios.get("/api/auth/session").then( | |
(response) => { | |
// we ARE still auth'd, so just throw the error down the chain | |
throw data; |
* 3e39dc2 (HEAD -> declare-positionState, origin/declare-positionState) declare positionState var | |
* 6bb203e (origin/remove-jsx-pragma, remove-jsx-pragma) remove `@jsx` pragma from source | |
* e64cb8e (origin/react-0.14, react-0.14) update for react-0.14 | |
* 18fcafd (origin/allow-role-override, allow-role-override) allow overriding role and setting arbitrary props on MenuOption | |
* dee59db (neil/master, neil-clickblur-handling) Limit focusing of react-menu to fix UI bug | |
* db914fc (duane/remove-constrain, duane/master, duane) Remove constrain | |
* 16a04d3 (neil/preferred_position, duane/preferred_position) Use react getDefaultProps instead of constrain | |
* fac6ffa Add preferredHorizontal and preferredVertical props | |
* 103b0c3 (neil/toggle_option, duane/toggle_option) Add keepOpenOnSelect boolean option to Menu | |
| * 8288c86 (karma-webpack) WIP replace browserify with webpack for builds |
let foo = { | |
alpha () { | |
return this.bravo(); | |
}, | |
bravo () { | |
return "charlie"; | |
} | |
} | |
export default foo; |
irb(main):001:0> require_relative 'test' | |
AWS SDK version: 2.7.16 | |
== TEST: test_copy_west_from_east | |
IT'S GOOD | |
== TEST: test_copy_east_from_west | |
IT'S GOOD | |
# ^ copy_from works fine regardless of direction |
Child = React.createClass({ | |
focusThing () { | |
this.btn.focus(); | |
}, | |
render () { | |
return ( | |
<div> | |
Here's the thing to <button ref={ el => this.btn = el }>focus</button> |
# ~/.dinghy/preferences.yml | |
--- | |
:preferences: | |
:unfs_disabled: false | |
:proxy_disabled: true | |
:dns_disabled: false | |
:fsevents_disabled: false | |
:create: | |
cpus: 4 | |
memory: 16384 |
#!/usr/bin/env ruby | |
require 'open3' | |
puts 'party time' | |
output = '' | |
status = Open3.popen2e('./sub.rb') do |std_in, std_out_err, wait_thr| | |
Thread.new do | |
begin | |
while out = std_out_err.readpartial(64) |
# binary search by ID to find record of type `model` whose created_at is closest to `timestamp`. | |
# assumes created_at is a monotonically increasing function of ID. | |
# `low_end_bias` is used to begin the search somewhere other than the first | |
# model ever. it's a percentage of records. useful when you know that the thing | |
# you're looking for is near the end of the list, which is the case for the | |
# thing I'm currently looking for, so I'm defaulting it to 0.99 | |
def find_closest_to(model, timestamp, low_end_bias = 0.99) | |
high_mark = model.last | |
low_id = (high_mark.id * low_end_bias).round |