#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.
| /*! | |
| * toggleAttr() jQuery plugin | |
| * @link http://github.com/mathiasbynens/toggleAttr-jQuery-Plugin | |
| * @description Used to toggle selected="selected", disabled="disabled", checked="checked" etc… | |
| * @author Mathias Bynens <http://mathiasbynens.be/> | |
| */ | |
| jQuery.fn.toggleAttr = function(attr) { | |
| return this.each(function() { | |
| var $this = $(this); | |
| $this.attr(attr) ? $this.removeAttr(attr) : $this.attr(attr, attr); |
| <!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.
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Alex Kloss <[email protected]> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| # -*- Conf -*- | |
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| showbranch = auto | |
| ui = true | |
| # color.branch | |
| # A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| # Create an alias directory in XAMPP | |
| # Ref: http://www.mauriciomunera.com/?p=127 | |
| # Ref: https://gist.github.com/ralphcrisostomo/4974674/ | |
| # Open the file /Applications/xampp/etc/httpd.conf in a text editor. | |
| # Add these lines to the end of the files. (change the name of the alias for the web application that suits better for you) | |
| <IfModule alias_module> | |
| # | |
| # Redirect: Allows you to tell clients about documents that used to | |
| # exist in your server's namespace, but do not anymore. The client | |
| # will make a new request for the document at its new location. |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| // ---- | |
| // Sass (v3.3.0.rc.2) | |
| // Compass (v1.0.0.alpha.17) | |
| // ---- | |
| // | |
| // map-fetch($map, $keys) | |
| // | |
| // An easy way to fetch a deep value in a multi-level map. Works much like | |
| // map-get() except that you pass multiple keys as the second parameter to |