#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.
#!/bin/bash | |
# author: Reinier Zwitserloot | |
# this script is in the public domain. I relinquish all rights. | |
# source: http://gist.github.com/210643 | |
# Plays various radio channels, using VLC. Run me from a terminal to see radio station options. | |
# If your radio skips a lot, you need to suid 'renice'. If you don't know what that means, don't try it yourself; it has serious security implications. | |
# For this to work, you need VLC. On debian / ubuntu: apt-get install vnc |
// origin: http://www.google.com/support/forum/p/Chrome/thread?tid=1a37ccbdde5902fd&hl=en | |
javascript: | |
timeout=prompt("Set timeout [s]"); | |
current=location.href; | |
if(timeout>0) | |
setTimeout('reload()',1000*timeout); | |
else | |
location.replace(current); | |
function reload(){ |
#!/usr/bin/env bash | |
# Center the top most window using AppleScript | |
# I call this up quickly using Quicksilver and run it as a terminal | |
# script because (surprise!) it's faster than running as native AppleScript | |
osascript -e " | |
tell application \"Finder\" | |
set screenSize to bounds of window of desktop | |
set screenWidth to item 3 of screenSize | |
end tell |
#!/usr/bin/env bash | |
# | |
# url : https://gist.github.com/672684 | |
# version : 2.0.2 | |
# name : appify | |
# description : Create the simplest possible mac app from a shell script. | |
# usage : cat my-script.sh | appify MyApp | |
# platform : Mac OS X | |
# author : Thomas Aylott <oblivious@subtlegradient.com> |
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
#!/usr/bin/ruby | |
# | |
# This script fixes /usr/local only. | |
# | |
# 6th January 2010: | |
# Modified the script to just fix, rather than install. - rpavlik | |
# | |
# 30th March 2010: | |
# Added a check to make sure user is in the staff group. This was a problem | |
# for me, and I think it was due to me migrating my account over several |
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
// Injecting JavaScript | |
// Basic compact | |
document.body.appendChild(document.createElement("script")).src="foo.js" | |
// Function wrapped | |
(function(d){d.body.appendChild(d.createElement("script")).src="foo.js"})(document) | |
// With "with" | |
with(document){body.appendChild(createElement("script")).src="foo.js"} | |
// Injecting CSS |
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
#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.