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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>jquery Tabs</title> | |
<style type="text/css"> | |
body {margin:0;padding:0;font: bold 11px/1.5em Verdana;background:#666; color:#fff} | |
h2 {font: bold 14px Verdana, Arial, Helvetica, sans-serif;color: #fff;margin:20px 0 0 0;padding: 0 0 0 15px} | |
img {border: none} | |
a img {border:0} |
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
//implement missing function | |
if(!document.getElementsByClassName){ | |
document.getElementsByClassName = function(cl) { | |
var retnode = [], | |
myclass = new RegExp('\\b'+cl+'\\b'), | |
elem = this.getElementsByTagName('*'); | |
for (var i = 0, max = elem.length; i < max; i++) { | |
var classes = elem[i].className; | |
if (myclass.test(classes)){ | |
retnode.push(elem[i]); |
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
$(window).load(function(){ | |
(function (win){ | |
var performance = | |
win.performance || | |
win.webkitPerformance || | |
win.mozPerformance || | |
win.msPerformance || | |
{}, | |
timings = performance.timing || {}, | |
testLoad = function(){ |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
var CSS_DIR = 'src/css/'; | |
var JS_DIR = 'src/js/'; | |
var BUILD_DIR = '../build/'; | |
// Project configuration. | |
grunt.initConfig({ |
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
#!/bin/sh | |
#version details | |
VERSION=0.8.8 | |
PLATFORM=linux | |
ARCH=x86 | |
PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH" | |
#download binaries | |
mkdir -p "$PREFIX" && \ |
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
#!/bin/sh | |
#version details | |
VERSION=1.6.1 | |
PLATFORM=linux | |
ARCH=i686 | |
FILE="phantomjs-$VERSION-$PLATFORM-$ARCH-dynamic" | |
#download binaries | |
wget -O $HOME/$FILE.tar.bz2 http://phantomjs.googlecode.com/files/$FILE.tar.bz2 |
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
#!/bin/bash | |
#list vhosts | |
IFS=$'\n' | |
for line in `ls -1 "$HOME/conf/apache2/sites-enabled"`; | |
do | |
grep "<VirtualHost " "$HOME/conf/apache2/sites-enabled/$line" | |
grep "DocumentRoot " "$HOME/conf/apache2/sites-enabled/$line" | |
done | |
#or just use sudo apache2ctl -S |
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 | |
$url = $_GET['url']; | |
$allowedurls = array( | |
'http://developer.yahoo.com', | |
'http://icant.co.uk' | |
); | |
if(in_array($url,$allowedurls)){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
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
$('#slider').on('touchstart touchmove touchend', 'a.ui-slider-handle', function (event) { | |
//mousevents to simulate on touch | |
var touchEvents = { | |
touchstart: 'mousedown', | |
touchmove: 'mousemove', | |
touchend: 'mouseup' | |
}; | |
//get element and type of event to simulate | |
var simulatedEvent = touchEvents[event.originalEvent.type], |
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
(function (w) { | |
w.location.hash = '#no-back'; | |
var historyApi = (typeof w.history.pushState !== 'undefined'); | |
if (w.location.hash == '#no-back') { | |
if (historyApi) { | |
w.history.pushState(null, '', '#stay'); | |
} else { | |
w.location.hash = '#stay'; |
OlderNewer