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
  • 12:25 (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
@adoubleyoueye
adoubleyoueye / african-roots-api-schema.skema
Last active November 26, 2019 12:34
the description for this gist
[{"name":"Users","color":"Grey","position":{"x":240,"y":85},"modelclass":"Bear","increment":true,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"name":"role","type":"integer","length":"","defaultvalue":"0","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c145","order":1},{"colid":"c218","name":"name","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false},{"colid":"c219","name":"email","type":"string","length":"200","order":3,"defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":true,"fillable":false,"guarded":false,"visible":false,"hidden":false},{"name":"password","type":"string","length":"","defaultvalue":"","enumv