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 strict'; | |
angular.module('thirdParty') | |
.directive('connectToQuickbooks', function($window){ | |
return { | |
restrict: 'E', | |
template: "<ipp:connectToIntuit></ipp:connectToIntuit>", | |
link: function(scope) { | |
var intuitScriptLoaded = function(){ |
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
curl -v 'https://stormy-lake-09991.herokuapp.com/' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' | |
* Trying 34.197.140.84... | |
* TCP_NODELAY set | |
* Connected to stormy-lake-09991.herokuapp.com (34.197.140.84) port 443 (#0) | |
* ALPN, offering h2 | |
* ALPN, offering http/1.1 | |
* successfully set certificate verify locations: | |
* CAfile: /etc/ssl/cert.pem | |
CApath: none |
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
# The following core errors are built in to elixir | |
# See https://github.com/elixir-lang/elixir/blob/main/lib/elixir/lib/exception.ex | |
ArgumentError | |
ArithmeticError | |
BadArityError | |
BadBooleanError | |
BadFunctionError | |
BadMapError | |
BadStructError |
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 Auth do | |
require Ash.Query | |
def can_on_instance?(resource, id, action_name, actor, api) do | |
action = Ash.Resource.Info.action(resource, action_name) | |
case action.type do | |
:create -> | |
false |
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
# Get intellisense working with the Ash Framework DSL in VSCode | |
# on MacOS using the asdf version manager | |
git clone https://github.com/elixir-lsp/vscode-elixir-ls.git | |
cd vscode-elixir-ls | |
# Update elixir_sense to the latest version and get dependencies | |
git submodule init | |
git submodule update --remote | |
cd elixir-ls |
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 YourApp.User.Actions.ConfirmWithToken do | |
use Ash.Resource.ManualCreate | |
def create(changeset, _opts, _context) do | |
strategy = AshAuthentication.Info.strategy!(YourApp.User, :confirm) | |
AshAuthentication.Strategy.action( | |
strategy, | |
:confirm, | |
%{"confirm" => changeset.arguments[:token]} |