Skip to content

Instantly share code, notes, and snippets.

View stafot's full-sized avatar
🐬

Stavros Foteinopoulos stafot

🐬
View GitHub Profile
@stafot
stafot / Large-app-how-to.md
Created January 6, 2018 22:06 — forked from cuibonobo/Large-app-how-to.md
How to structure a large application in Flask. Taken from the Flask wiki: https://github.com/mitsuhiko/flask/wiki/Large-app-how-to

Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator


This document is an attempt to describe the first step of a large project structure with flask and some basic modules:

  • SQLAlchemy
  • WTForms

Please feel free to fix and add your own tips.

@stafot
stafot / cors-test.sh
Created December 11, 2017 11:48 — forked from skounis/cors-test.sh
Test CORS headers with curl
#!/bin/bash
curl -X GET -H "Origin: http://example.com" --verbose http://foo.com/bar
curl -X POST -H "Origin: http://example.com" --verbose http://foo.com/bar
curl -X PUT -H "Origin: http://example.com" --verbose http://foo.com/bar

Keybase proof

I hereby claim:

  • I am stafot on github.
  • I am stafot (https://keybase.io/stafot) on keybase.
  • I have a public key whose fingerprint is 3220 75BF 4095 474C 19CC A138 017A CC4D 239B 863E

To claim this, I am signing this object:

@stafot
stafot / aws.zsh
Created September 8, 2016 13:54 — forked from alexsapran/aws.zsh
AWS CLI bash wrapper dot file
_warning(){
echo -e "\e[31m${@}\e[0m"
}
_info(){
echo -e $@
}
_success(){
echo -e "\e[32m${@}\e[0m"
}
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
06/2016 OR 08/2018 737 7373
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header