Skip to content

Instantly share code, notes, and snippets.

View twilly86's full-sized avatar

Tom Wilson twilly86

View GitHub Profile
<html>
<head>
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, target-densitydpi=device-dpi" />
<script type="text/javascript" src="cordova.js"></script>
@twilly86
twilly86 / gist:8659acb9dd6added2ab4
Created September 2, 2014 13:29
crosswalk cordova index.js file updated to print in onpause and onresume events to debug issue
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@twilly86
twilly86 / MyViewController.swift
Last active September 5, 2021 07:25
Load WKWebView in Background Process
var start = NSDate()
for i in 0...9
{
self.webViews.append(WKWebView())
}
let end = NSDate();
NSLog("creating webviews \(end.timeIntervalSinceDate(start))")
@twilly86
twilly86 / racViewController
Created November 24, 2014 18:55
Swift RAC Reactive Cocoa Array Example
class RootViewController: UIViewController {
var numberArray : [Int] = []
// this is intentionally blank
override func viewDidLoad() {
var signal = RACObserve2(self.numberArray, "property")
signal.subscribeNext { (object) -> Void in
@twilly86
twilly86 / EFSecondLevelCache.Redis.cs
Last active March 11, 2021 13:17
EFSecondLevelCache Redis Service Provider
using EFSecondLevelCache;
using EFSecondLevelCache.Contracts;
using Newtonsoft.Json;
using StackExchange.Redis;
using StackExchange.Redis.Extensions.Core;
using StackExchange.Redis.Extensions.Newtonsoft;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@twilly86
twilly86 / Upsert.cs
Last active October 11, 2022 12:36
AddOrUpdate entityframework upsert call on specific properties
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
/// <summary>