Skip to content

Instantly share code, notes, and snippets.

View rtroe's full-sized avatar

Rob Tom Roe rtroe

View GitHub Profile
@rtroe
rtroe / AndroidLogs
Last active June 20, 2020 06:30
Returns a list of all android crashes from a PC
//C:\Program Files (x86)\Android\android-sdk\platform-tools
adb logcat AndroidRuntime:E *:S
#if OPENGL
#define SV_POSITION POSITION
#define VS_SHADERMODEL vs_3_0
#define PS_SHADERMODEL ps_3_0
#else
#define VS_SHADERMODEL vs_4_0_level_9_1
#define PS_SHADERMODEL ps_4_0_level_9_1
#endif
matrix WorldViewProjection;
window.onload = function() {
}
function removejscssfile(filename, filetype){
var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" //determine element type to create nodelist from
var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none" //determine corresponding attribute to test for
var allsuspects=document.getElementsByTagName(targetelement)
for (var i=allsuspects.length; i>=0; i--){ //search backwards within nodelist for matching elements to remove
if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1)
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=http://example.com">
<script type="text/javascript">
window.location.href = "http://example.com"
</script>
<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish"/>
<title>Page Redirection</title>
/// <summary>
/// Shows the initersial ad if there's one loaded.
/// </summary>
public void ShowInitersialAd()
{
#if __ANDROID__
if (mInterstitialAd.IsLoaded)
{
mInterstitialAd.Show();
public void LoadIniterstialelAd()
{
#if __ANDROID__
if (mInterstitialAd.IsLoaded==false)
{
var adRequest = new AdRequest.Builder()
#if DEBUG
.AddTestDevice("DEADBEEF9A2078B6AC72133BB7E6E177") // Prevents generating real impressions while testing
#endif
/// <summary>
/// Adds the initerstialel ad.
/// </summary>
/// <param name="adUnitID">Ad unit identifier.</param>
public void InitIniterstialelAd(string adUnitID)
{
this.AdUnitID = adUnitID;
#if __ANDROID__
try
/// <summary>
/// Adds the banner.
/// </summary>
/// <param name="adUnitID">Ad unit identifier.</param>
/// <param name="Location">Location.</param>
public void InitBanner(string adUnitID, Vector2 Location)
{
#if __ANDROID__
/// <summary>
/// Initialise a new AdMob Ad Overlay. This is a Cross platform method which will run on both Android and iOS.
/// </summary>
/// <param name="game">The host game to et the service container from</param>
/// <param name="location">The location to place the add on the screen</param>
public AdManager(Game Game, Vector2 location)
{
this.Game = Game;
#if __ANDROID__
using System;
using Microsoft.Xna.Framework;
using Virtex.Lib.Vrtc.Core;
using Microsoft.Xna.Framework.GamerServices;
#if __IOS__
using CoreGraphics;
using UIKit;
using Google.MobileAds;
#endif