Skip to content

Instantly share code, notes, and snippets.

View adoubleyoueye's full-sized avatar
:shipit:
Ship happens

Awi Mphaphuli adoubleyoueye

:shipit:
Ship happens
  • Remote
  • 01:22 (UTC +02:00)
View GitHub Profile
@adoubleyoueye
adoubleyoueye / security-tips.php
Created April 9, 2021 12:22 — forked from roscabgdn/security-tips.php
Advanced WordPress Security Tips
/*
* this code goes in your theme`s functions.php file
*/
add_filter('login_errors',create_function('$a', "return null;"));
define( 'DISALLOW_FILE_EDIT', true );
function no_wordpress_errors(){
return 'Nothing to see here, move along!';
}
@adoubleyoueye
adoubleyoueye / flaskplotlib.py
Created March 22, 2020 17:25 — forked from wilsaj/flaskplotlib.py
Example of rendering a matplotlib image directly to Flask view
from flask import Flask, make_response
app = Flask(__name__)
@app.route("/simple.png")
def simple():
import datetime
import StringIO
import random
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas