Skip to content

Instantly share code, notes, and snippets.

View bright-spark's full-sized avatar
♥️
Tinkering with stuff!

martin. bright-spark

♥️
Tinkering with stuff!
View GitHub Profile
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!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>
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#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.

@devfred
devfred / browser-detect.js
Last active August 7, 2020 23:28
javascript: Browser Detection
(function( undefined ){
/* Apple Device Webkit Browsers */
var isIdevice = /(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent);
if (isIdevice){
document.getElementsByTagName('body')[0].className += ' iphone ipod ipad';
}
var isIphone = /(iPhone).*AppleWebKit/i.test(navigator.userAgent);
if (isIphone){
document.getElementsByTagName('body')[0].className += ' iphone';
@mlynch
mlynch / manifest.json
Created July 20, 2012 20:02
Codiqa Project Manifest
{
"name": "Codiqa Prototypes",
"description": "Rapid Mobile Prototyping - Saves directly to Google Drive!",
"version": "1.3",
"container": "GOOGLE_DRIVE",
"api_console_project_id" : "CONSOLE_PROJECT_ID",
"intents": {
"http://drive.google.com/intents/opendrivedoc": [ {
"disposition": "window",
"href": "http://codiqadrive.appspot.com",
@cjanis
cjanis / gist:3908053
Created October 17, 2012 20:44 — forked from kylebarrow/example.html
Prevent internal links in iOS standalone web apps from opening in Mobile Safari
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;
}
});
}
@bernsno
bernsno / cmal-fresh-mac-setup.md
Created November 10, 2012 18:03 — forked from cmalven/cmal-fresh-mac-setup.md
Fresh Mac Setup

New Computer Setup

Last tested using Mac OS X 10.8 Mountain Lion

Before Wiping Original Install

  • Backup .ssh folder to avoid having to regenerate codes for services such as Heroku and Github.
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@adrienne
adrienne / php.ini
Created June 21, 2013 08:12
PHP .ini file
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@coolaj86
coolaj86 / .gitignore
Last active December 12, 2017 16:05
Forward SMS from one number to another using Twilio
config.js
poulton:Applications -->chrome-ssb.sh
What should the Application be called?
Gmail
What is the url (e.g. https://www.google.com/calendar/render)?
https://mail.google.com/mail/u/0/
What is the full path to the icon (e.g. /Users/username/Desktop/icon.png)?
/Users/poulton/Dropbox/Rocketmade/app\ icons/gmail-orangish.icns
poulton:Applications -->