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
### Keybase proof | |
I hereby claim: | |
* I am mcabrams on github. | |
* I am mcabrams (https://keybase.io/mcabrams) on keybase. | |
* I have a public key ASDVmUW_AwZhhFQ2yXwx8-85auCtReUxhZYkW9ab_c55tAo | |
To claim this, I am signing this object: |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
try: | |
# Use Stripe's library to make requests... | |
stripe.PaymentIntent.create(......) | |
except stripe.error.CardError as e: | |
# Since it's a decline, stripe.error.CardError will be caught | |
print('Status is: %s' % e.http_status) | |
print('Type is: %s' % e.error.type) | |
print('Code is: %s' % e.error.code) | |
# param is '' in this case |
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
@api_view(['POST']) | |
def stripe_session(request): | |
meeting_id = request.data.get('meetingId') | |
meeting = Meeting.objects.get(zoom_meeting__zoom_id=meeting_id) | |
stripe_account_id = meeting.creator.stripe_account_id | |
print(settings.STRIPE_API_KEY) | |
stripe.api_key = settings.STRIPE_API_KEY | |
session = stripe.checkout.Session.create( | |
payment_method_types=['card'], |
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
# Models | |
class Foo(Model): | |
text = models.CharField(max_length=64, blank=False) | |
class Bar(Model): | |
text = models.CharField(max_length=64, blank=False) | |
# Factories | |
class FooFactory(factory.django.DjangoModelFactory): |
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
// This is a configuration for Phoenix <https://github.com/sdegutis/Phoenix>, | |
// a super-lightweight OS X window manager that can be configured and | |
// scripted through Javascript. | |
var mNone = [], | |
mCmd = ['cmd'], | |
mShift = ['shift'], | |
nudgePixels = 10, | |
padding = 0, | |
previousSizes = {}; |