This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
local hashed = require('libs.hashed') | |
local _M = {} | |
local scripts = {} | |
-- NoMoreGlobalFunctionsInScripts | |
function _M.new() | |
local script = { |
// https://davidpiesse.github.io/tailwind-md-colours/ | |
// | |
//Notes | |
// | |
//All colours are generated from Material Design Docs | |
//Colours have a base, a set of shades (50-900) accent colours | |
//In addition a companion set of contrast colours are included for colouring text / icons | |
// Example usage | |
// class="w-full bg-red-600 text-red-600-constrast" |
-- [[ Cheatsheet for LUA from http://www.newthinktank.com/2015/06/learn-lua-one-video/]] | |
-- Prints to the screen (Can end with semicolon) | |
print("Hello World") | |
--[[ | |
Multiline comment | |
]] | |
-- Variable names can't start with a number, but can contain letters, numbers |
graph = {'A': ['B', 'C'], | |
'B': ['C', 'D'], | |
'C': ['D'], | |
'D': ['C'], | |
'E': ['F'], | |
'F': ['C']} | |
def find_shortest_path(graph, start, end, path=[]): | |
path = path + [start] |
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ | |
&& tar -xvvzf ioncube.tar.gz \ | |
&& mv ioncube/ioncube_loader_lin_5.6.so `php-config --extension-dir` \ | |
&& rm -Rf ioncube.tar.gz ioncube \ | |
&& docker-php-ext-enable ioncube_loader_lin_5.6 |
import asyncio | |
async def listener(): | |
while True: | |
message = await sqs.poll() | |
if message: | |
asyncio.ensure_future(handle(message)) | |
async def handler(message): | |
await ... |
public static byte[] generateByteArrayProfileImage(Context context, Uri uri) | |
throws ExecutionException, InterruptedException { | |
int width = Constantes.PROFILE_IMAGE_SIZE_WIDTH; | |
int height = Constantes.PROFILE_IMAGE_SIZE_HEIGHT; | |
return Glide.with(context.getApplicationContext()) | |
.load(uri) | |
.asBitmap() | |
.toBytes(Bitmap.CompressFormat.JPEG, 70) |
Use: for testing against email regex | |
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses | |
List of Valid Email Addresses | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
return { | |
aliceblue = {0.94117647058824, 0.97254901960784, 1}, | |
antiquewhite = {0.98039215686275, 0.92156862745098, 0.84313725490196}, | |
aqua = {0, 1, 1}, | |
aquamarine = {0.49803921568627, 1, 0.83137254901961}, | |
azure = {0.94117647058824, 1, 1}, | |
beige = {0.96078431372549, 0.96078431372549, 0.86274509803922}, | |
bisque = {1, 0.89411764705882, 0.76862745098039}, | |
black = {0, 0, 0}, | |
blanchedalmond = {1, 0.92156862745098, 0.80392156862745}, |