#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
<?php | |
/* | |
Plugin Name: Add Extra Comment Fields | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: An example of how to add, save and edit extra comment fields in WordPress | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: MIT | |
*/ |
<?php | |
// No, Thanks. Direct file access forbidden. | |
! defined( 'ABSPATH' ) AND exit; | |
// INIT | |
add_action( 'after_setup_theme', array( 'unavailable_post_status', 'init' ) ); | |
class unavailable_post_status extends wp_custom_post_status | |
{ | |
/** |
alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
tiles = {'a': 9, 'c': 2, 'b': 2, 'e': 12, 'd': 4, 'g': 3, 'f': 2, 'i': 9, 'h': 2, 'k': 1, 'j': 1, 'm': 2, 'l': 4, 'o': 8, 'n': 6, 'q': 1, 'p': 2, 's': 4, 'r': 6, 'u': 4, 't': 6, 'w': 2, 'v': 2, 'y': 2, 'x': 1, 'z': 1} | |
points = {'a': 1, 'c': 3, 'b': 3, 'e': 1, 'd': 2, 'g': 2, 'f': 4, 'i': 1, 'h': 4, 'k': 5, 'j': 8, 'm': 3, 'l': 1, 'o': 1, 'n': 1, 'q': 10, 'p': 3, 's': 1, 'r': 1, 'u': 1, 't': 1, 'w': 4, 'v': 4, 'y': 4, 'x': 8, 'z': 10} | |
# I downloaded the "complete word list" from http://www.scrabblejunction.org/wordlists.htm | |
words = open('TWL_2006_ALPHA.txt').read().split('\n') | |
#convert every word to lower-case | |
words = [word.lower() for word in words] | |
#decide if a word is playable |
if (window.navigator.standalone) { | |
var local = document.domain; | |
$('a').click(function() { | |
var a = $(this).attr('href'); | |
if ( a.match('http://' + local) || a.match('http://www.' + local) ){ | |
event.preventDefault(); | |
document.location.href = a; | |
} | |
}); | |
} |
#!/usr/bin/env python | |
import argparse | |
import sys | |
import jinja2 | |
import markdown | |
TEMPLATE = """<!DOCTYPE html> | |
<html> |
> rPrint({first={true,1.3,"abc",{1,2,5}},22,33,last={nil,5},2},nil,"Junk") | |
Junk table | |
Junk [1] number 22 | |
Junk [2] number 33 | |
Junk [3] number 2 | |
Junk [last] table | |
Junk [last] [2] number 5 | |
Junk [first] table | |
Junk [first] [1] boolean true | |
Junk [first] [2] number 1.3 |
<html> | |
<head> | |
<link rel="stylesheet" href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css"></link> | |
<!-- jquery.js must be loaded before bootstrap.js. --> | |
<script type="text/javascript" src="http://getbootstrap.com/2.3.2/assets/js/jquery.js"></script> | |
<script type="text/javascript" src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script> | |
<script type="text/javascript" src="paint.js"></script> | |
<style type="text/css"> | |
body { |
I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!
Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.
Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist
I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).
Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |