This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-animated-pages/core-animated-pages.html"> | |
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html"> | |
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-down.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-up.html"> | |
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<polymer-element name="my-element"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout( | |
(function(el){ | |
return function(){ | |
el.hide(); | |
}; | |
}($(this))), 2000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
@include image-2x("logo.png", "logo2x.png"); | |
} | |
@mixin image-2x($image1, $image2) { | |
background-image: url($image); | |
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | |
background-image: url($image2); | |
background-size: image-width($image1) image-height($image1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while :; do cat /System/Library/Accessibility/AccessibilityDefinitions.plist | say -v Whisper; sleep 1; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class='pager'> | |
<?php | |
//The goal is to have a pager showing (if available) 5 numbers, | |
//with the current page number in the middle, if available. | |
// <<First and <Previous are shown if you can't see page 1, | |
// and Next> and Last>> are shown if you can't see the last page. | |
$start = $currentpage <= 2 ? 1 : $currentpage - 2; | |
$end = $currentpage > ($totalpages - 2) ? $totalpages : $currentpage + 2; | |
if ($end == $totalpages && $start > 2) { | |
$diff = $totalpages - $currentpage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name=”gender”> | |
<option value=”1”>Male</option> | |
<option value=”2”>Female</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($_GET['src'])) { | |
//for testing, navigate to thumbnail.php?img=page/to/yourimage.jpg | |
echo "<img src='/thumbnail.php?src={$_GET['img']}' />"; | |
} else { | |
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); | |
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); | |
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 | |
header ("Pragma: no-cache"); // HTTP/1.0 | |
header("Content-type: image/pjpeg"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "iphone") !== FALSE | |
|| strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "ipod") !== FALSE | |
|| strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "android") !== FALSE | |
|| strpos(strtolower($_SERVER['HTTP_USER_AGENT']), "blackberry") !== FALSE ) { | |
include 'mobile.php'; | |
} else { | |
?><!DOCTYPE ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jQT = new $.jQTouch({ | |
'icon': '/presentation/libraries/jqtouch/themes/mytheme/img/icon.png', | |
addGlossToIcon: true, | |
startupScreen: '/presentation/libraries/jqtouch/themes/mytheme/img/startup.png', | |
statusBar: 'black', | |
preloadImage: [ | |
//... | |
], | |
useFastTouch: false //allows us to do $().submit() on forms | |
}); |