This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
var pages = []; | |
var page; | |
var numberOfPages = 0; | |
// Configuration | |
var pageColor = "#c99ed5"; |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
/** | |
* Clearfix based off this: http://nicolasgallagher.com/micro-clearfix-hack/ | |
* For modern browsers | |
* Known support: Firefox 3.5+, Safari 4+, Chrome, Opera 9+, IE 6+ | |
* 1. The space content is one way to avoid an Opera bug when the | |
* contenteditable attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that are clearfixed. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsite.com.br', 'http://www.newsite.com'); | |
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldsite.com', 'http://www.newsite.com'); | |
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://www.oldsite.com','http://www.newsite.com'); |
<?php | |
/** | |
* return $images_id array() | |
*/ | |
function get_gallery_attachments(){ | |
global $post; | |
$post_content = $post->post_content; | |
preg_match('/\[gallery.*ids=.(.*).\]/', $post_content, $ids); | |
$images_id = explode(",", $ids[1]); |
# Filename-based cache busting | |
# taken from https://github.com/h5bp/html5-boilerplate/ | |
# This rewrites file names of the form `name.123456.js` to `name.js` | |
# so that the browser doesn't use the cached version when you have | |
# updated (but not manually renamed) the file. | |
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On |
/** | |
iOS Media Queries | |
compatível com iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2 | |
Author @hullen | |
Fique a vontade em utilizar, colaborar e compartilhar! | |
*/ | |
/** | |
iPhone (4/4S) - modo paisagem | |
cor do link: laranja com fundo verde |
{ | |
"patterns": [ | |
{ | |
"pattern": "(console\\.log\\(.*?\\))", | |
"scopes": [ | |
"storage.type.function.js", | |
"meta.function.json.js", | |
"source.js" | |
] | |
}, |
var mobileCheck = { | |
ios: (function(){ | |
return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
}()), | |
android: (function(){ | |
return navigator.userAgent.match(/Android/i); | |
}()), | |
blackBerry: (function(){ | |
return navigator.userAgent.match(/BB10|Tablet|Mobile/i); | |
}()), |