➜ ~ nginx
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)
nginx: [emerg] still could not bind()
➜ ~ sudo nginx -s stop
Password:
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<title>LocalStorage fault</title> | |
<link rel="stylesheet" href="http://typo.sofish.de/typo.css" /> | |
</head> | |
<body class="typo" style="width:800px;margin:30px auto;"> | |
<h3># error message</h3> |
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<title>Loader</title> | |
<link href="http://typo.sofish.de/typo.css" rel="stylesheet" /> | |
<style type="text/css"> | |
code{padding:0 2px;border:1px solid #eee;background:#f7f7f7;border-radius:3px;} | |
</style> | |
<script src="http://test.com:8080/static/??sea/sea.js,modules/jquery-1.7.2.min.js"></script> |
This file contains hidden or 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
<script src="http://test.com:8080/static/??sea/sea.js,modules/jquery-1.7.2.min.js"></script> | |
<script> | |
seajs.config({ | |
base: 'http://test.com:8080/static/modules' | |
}); | |
seajs.use('jquery', 'geolocation', function($, geo){ | |
geo(function(coords){ | |
$('#geo').html(coords.latitude + ', ' + coords.longitude); | |
}, function(err){ | |
alert('error occurred: ' + err); |
This file contains hidden or 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
define('geolocation', [], function(require, module, exports){ | |
/* | |
* @Name: Geolocation | |
* @Overview: the javascript way to fetch the geolocation | |
* @Author: sofish Lin <http://sofish.de> | |
*/ | |
// TODO: error handler for ie | |
function geo(successCallback, errorCallback) { |
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<title>Loader</title> | |
<script src="./loader/sea.js"></script> | |
</head> | |
<body> | |
<script> |
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<title>Sample</title> | |
<style> | |
/* | |
@ 名称: 投影 | drop shadow | |
@ 用法: 添加 .sl-shadow |
This file contains hidden or 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
array (size=4) | |
'name' => string 'ie' (length=2) | |
'version' => string '7.0' (length=3) | |
'platform' => string 'win' (length=3) | |
'ua' => string 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; TencentTraveler 4.0)' (length=84) |
This file contains hidden or 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 formSelect = $('.form-select'); | |
if(formSelect.length) { | |
var menu = $('.form-select-menu', formSelect), | |
form = formSelect.parents('form'); | |
formSelect.hover(function(){ | |
$(this).addClass('form-select-open'); | |
}, function(){ | |
$(this).removeClass('form-select-open'); |
This file contains hidden or 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> | |
<meta charset="utf-8" /> | |
<title>non quirks mode padding</title> | |
</head> | |
<body> | |
<div style="width:200px;height:90px;background:#f30;"></div> | |
<br /> |