Skip to content

Instantly share code, notes, and snippets.

View stafot's full-sized avatar
🐬

Stavros Foteinopoulos stafot

🐬
View GitHub Profile
#!/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
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
@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"
}

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 / 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
@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 / emojis.js
Created January 28, 2018 08:17 — forked from thisisshi/emojis.js
Quick and Dirty Emoji Export from Slack
// Go to: https://<team>.slack.com/customize/emoji
// Open Developer Console
// Copy/Paste and Run this in the console:
var spans = document.getElementsByTagName('span');
var basharray = "( "
for (var i=0;i<spans.length;i++) {
var link = spans[i].getAttribute("data-original");
if(link != null){
basharray = basharray.concat(link, " ")
@stafot
stafot / cli-fu.md
Created July 8, 2018 05:45 — forked from mhausenblas/cli-fu.md
Michael's bash snippets
@stafot
stafot / k8s-svc-annotations.md
Created October 15, 2018 08:54 — forked from mgoodness/k8s-svc-annotations.md
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@stafot
stafot / index.md
Created October 22, 2018 11:45 — forked from bvaughn/index.md
How to use profiling in production mode for react-dom