Skip to content

Instantly share code, notes, and snippets.

[
{
"action":
{
"selector": "div.sideAd",
"type": "css-display-none"
},
"trigger":
{
"url-filter": "macrumors.com"
@deanPGM
deanPGM / blockerList.json
Created July 10, 2015 23:13
A whitelist example - This blocks every website apart from bbc.co.uk
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*"
}
},
{
@deanPGM
deanPGM / dailybonus.lua
Last active December 15, 2015 17:59
Daily Bonus
-- For info go to the following web address:
-- https://developer.coronalabs.com/code/daily-bonus
prefs = require "preference_library"
local function checkForSinglePlayerBonus( )
local lastDayNum = prefs.getValue( "lastDayNum" ) or 0
local lastMonthNum = prefs.getValue( "lastMonthNum" ) or 0
local date = os.date( "*t" )
local thisDayNum = (date.day)
function requestCallback( event )
end
function setHighscoreGC(category, scoreGC)
print (category, scoreGC)
-- loggedIntoGC must be true
loggedIntoGC = true
if loggedIntoGC then gameNetwork.request( "setHighScore", {localPlayerScore={ category= category, value=scoreGC }, listener=requestCallback } ); end
end
@deanPGM
deanPGM / gist:4164758
Created November 28, 2012 21:38
Twitter post
-- Requires GGTwitter libs to be setup
-- https://github.com/GlitchGames/GGTwitter
tweeted = false
local listenerTwitter = function( event )
if event.phase == "authorised" and tweeted == false then
print "twitter authorised"
twitter:post( "Test Tweet 1 of 2" )
native.showAlert("Twitter", "Your score has been posted to Twitter!", {"Ok"})
@deanPGM
deanPGM / revmob.lua
Created October 9, 2012 19:28
Revmob.lua with custom image
-- the only code changed from the original is from lines 454 to 466
package.preload['json']=(function(...)local e=string
local a=math
local u=table
local i=error
local d=tonumber
local c=tostring
local s=type
local o=setmetatable
@deanPGM
deanPGM / revmob.lua
Created October 5, 2012 10:58
Adds a delay to being able to turn off full screen adverts.
-- the only code changed from the original is from lines 454 to 466
package.preload['json']=(function(...)local e=string
local a=math
local u=table
local i=error
local d=tonumber
local c=tostring
local s=type
local o=setmetatable
@deanPGM
deanPGM / config.lua
Created September 19, 2012 18:20
Corona SDK: Config.lua for display options covering all iOS device resolutions.
local targetDevice = ( system.getInfo( "model" ) )
local isTall = ( "iPhone" == system.getInfo( "model" ) ) and ( display.pixelHeight > 960 )
if isTall == false and targetDevice == "iPhone" then
application =
{
content =
{
width = 320,
height = 480,