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
/* | |
* vg-bkg-size | |
* A Videogular plugin to emulate background-size CSS property for video: "cover" or "contain" | |
* | |
* Use: | |
* <videogular vg-bkg-size="cover" center="true"></videogular> | |
* vg-bkg-size => "cover" or "contain" | |
* center => true or false | |
* | |
* Copyright (c) 2014 Panurge Web Studio |
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
For more details, see http://code.garyjones.co.uk/install-wordpress-ssh/ | |
wget http://wordpress.org/latest.tar.gz | |
tar zxf latest.tar.gz | |
cd wordpress | |
cp -rpf * ../ | |
cd ../ | |
rm -rf wordpress/ | |
rm -f latest.tar.gz |
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
app.directive 'mouseWheelScroll', ($timeout) -> | |
return { | |
restrict: 'A' | |
# require: '^$ionicScroll' | |
link: ($scope, $element, $attrs) -> | |
scrollCtrl = $element.controller('$ionicScroll') | |
console.log scrollCtrl | |
unless scrollCtrl | |
return console.error('mouseWheelScroll must be attached to a $ionicScroll controller.') |
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
angular.module('Demo', []).service( | |
'scrollAndResizeListener', function($window, $document, $timeout) { | |
var id = 0, | |
listeners = {}, | |
scrollTimeoutId, | |
resizeTimeoutId; | |
function invokeListeners() { | |
var clientHeight = $document[0].documentElement.clientHeight, | |
clientWidth = $document[0].documentElement.clientWidth; |
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
{ | |
"directory": "bower_components" | |
} |
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
$(document).ready(function(){ | |
// external links to new window | |
$('a[href^="http://"]').not('a[href*="mydomainname"]').attr('target','_blank'); | |
// force PDF Files to open in new window | |
$('a[href$=".pdf"]').attr('target', '_blank'); | |
}); |
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 iphone4 = (window.screen.height == (960 / 2)); | |
var iphone5 = (window.screen.height == (1136 / 2)); |
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 | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
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
/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */ | |
:root { | |
-webkit-text-size-adjust: none; | |
-moz-text-size-adjust: none; | |
-ms-text-size-adjust: none; | |
-o-text-size-adjust: none; | |
text-size-adjust: none; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WebWorker image preloading</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /> | |
</head> | |
<body> | |
<div id="output"></div> | |
<script id="imgloader" type="javascript/worker"> | |
// Not race proof or robust. Proof of concept. |
OlderNewer