Mix.install([
{:bumblebee, "~> 0.4.2"},
{:nx, "~> 0.6.1"},
{:exla, "~> 0.6.1"}
])
Nx.global_default_backend({EXLA.Backend, client: :host})
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
defmodule MyApp.AWS.HTTPClient do | |
@moduledoc """ | |
Implements the `AWS.HTTPClient` behaviour for use with the `AWS` library. | |
This is a simple wrapper around the `Req` library. Helps us avoid having to | |
include Hackney as a dependency. | |
""" | |
@behaviour AWS.HTTPClient |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
total: 20.0, | |
current: 4.5, | |
log: [], | |
progress: Ember.computed('total', 'current', { | |
get() { |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
classNames: 'video-controls video-layer'.w(), | |
hidden: false, | |
actions: { | |
togglePlayback: function() { | |
this.sendAction('togglePlayback'); |
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
# DOES NOT WORK | |
test 'authenticate with valid authentication token key and do not store if stateless and timeoutable are enabled' do | |
swap Devise, :token_authentication_key => :secret_token, :stateless_token => true do | |
user = sign_in_as_new_user_with_token | |
assert warden.authenticated?(:user) | |
get expire_user_path(user) | |
get_users_path_as_existing_user(user) | |
assert warden.authenticated?(:user) |
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
<!-- ============================================================== --> | |
<!-- = Code Snippets from Mobile Webkit Development Talk on 11/16 = --> | |
<!-- ============================================================== --> | |
<!-- =========================== --> | |
<!-- = Conditional Stylesheets = --> | |
<!-- =========================== --> | |
<link media="only screen and (max-device-width: 480px)" href="small-device.css" type= "text/css" rel="stylesheet"> |