Skip to content

Instantly share code, notes, and snippets.

View StevenWarren's full-sized avatar

Steven Warren StevenWarren

  • Jacksonville Fl
View GitHub Profile
@StevenWarren
StevenWarren / scientific.lua
Created July 21, 2020 23:49
Hack to stop Corona going scientific
--hack to stop Corona going scientific
local _tostring = tostring
tostring = function( v )
if type(v) == 'number' and v>10e12 then
return string.format("%.f", v)
end
return _tostring(v)
end
package.loaded[ 'json' ] = nil
package.loaded[ 'dkjson' ] = nil
@StevenWarren
StevenWarren / .env
Last active August 5, 2020 12:13
Wordpress Docker
MYSQL_ROOT_PASSWORD=somerootpassword
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
MYSQL_PASSWORD=wordpress
@StevenWarren
StevenWarren / lua.json
Created June 28, 2020 19:00
VSCode snippets for LUA and Solar2d
{
"Spec Describe": {
"prefix": "describe",
"body": [
"describe('$1', function() $0 end)"
],
"description": "Busted spec descibe statement"
},
"Spec It": {
"prefix": "it",
@StevenWarren
StevenWarren / poco_gen.sql
Last active May 18, 2019 01:53
Create C# POCO class from SQL Server
DECLARE
@table varchar(100),
@tmp varchar(max),
@usings varchar(100),
@namespace varchar(100),
@lf char(2),
@t char(1);
SET @table = 'action';
SET @namespace = 'MyProject.Models';
@StevenWarren
StevenWarren / docker-compose.yml
Last active October 1, 2020 05:25
Openproject docker-compose
version: '3'
services:
openproject:
container_name: openproject
image: openproject/community:7
ports:
- 8080:80
volumes:
- ./openproject/static:/var/db/openproject
- ./openproject/logs:/var/log/supervisor
@StevenWarren
StevenWarren / sqitch.sh
Created March 9, 2018 19:53
Shell script to alias Sqitch running in a Docker container
#!/usr/bin/env bash
#
# Dockerized Sqitch made easier
#
# References:
# Sqitch - https://metacpan.org/pod/sqitchtutorial
# Docker Image - https://hub.docker.com/r/jmabey/sqitch/
# Configuration:
# Add a .env file in same directory and configure it.
#
@StevenWarren
StevenWarren / CoronaImageExt.lua
Last active June 10, 2016 18:00
A bug in Corona SDK on iPad2 causes images not to scale to full screen. This override forces every image to load at its exact resolution. All credit goes to Bomzy Apps and Dave Grant.
local _newImage = display.newImage
display.newImage = function(...)
local lastArg = arg[#arg]
if(lastArg ~= true) then
arg[#arg+1] = true
end
return _newImage(unpack(arg))
end