- Basic approach is to do a project-wide search for
FB.
and do the below: - add
oauth: true
toFB.init
call - in the response from
FB.login
,FB.getStatus
, etc., changesession
toauthResponse
. It will be null if they user didn't allow, as withsession
. - replace all use of the terms
perms
with the termscope
- Doesn't look like we can check permissions in the response?
- Update all
FB.event.subscribe
calls listening for events withsession
in the name to listen for equivalentauthResponse
events. session.uid
is nowauthResponse.userID
session.access_token
is nowsession.accessToken
- whereas previously, when authenticating and making an API call on a subsequent page, the API call seemed to work immediately, with the access token passed along. This does not appear to be the case anymore - all API calls that require auth should be within an
FB.login
orFB.checkLoginStatus
callback.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSV_SETTINGS = { | |
headers: true, # first row is headers | |
header_converters: :symbol, # convert headers to symbols | |
converters: [ | |
-> (f) { f.present? ? f : nil }, # convert empty cells to nil | |
-> (f) { f.respond_to?(:gsub) ? f.gsub(/\s+$/, '') : f }, # convert whitespace to nil | |
:all # converts things to numbers and dates | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Alt from 'alt'; | |
let alt = new Alt(); | |
class AnimalActions { | |
run() { | |
// do some stuff | |
this.dispatch(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
} | |
img { | |
cursor: pointer; | |
} | |
.back { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### deploy.rb | |
# setup rvm | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
set :rvm_ruby_string, 'ruby-1.9.2-p290' | |
set :rvm_bin_path, "#{rvm_path}/bin" | |
# setup bundler | |
require 'bundler/capistrano' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'httparty' | |
module Tumblr | |
class API | |
include HTTParty | |
attr_reader :api_key, :access_token | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript">var disqus_url = "{Permalink}"; var disqus_title ="{block:PostTitle}{PostTitle}{/block:PostTitle}";</script>{block:Permalink}<div id="disqus_thread"></div> | |
<script type="text/javascript"> | |
/** | |
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread] | |
*/ | |
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = 'http://penready.disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--[if lte IE 8]> | |
<link href="ie8.css" media="screen" rel="stylesheet" type="text/css" /> | |
<![endif]--> | |
<!--[if IE 7]> | |
<link href="ie7.css" media="screen" rel="stylesheet" type="text/css" /> | |
<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> | |
<!-- at /api/crossdomain.xml --> | |
<cross-domain-policy> | |
<allow-access-from domain="*"/> | |
</cross-domain-policy> |
OlderNewer