Skip to content

Instantly share code, notes, and snippets.

View ccwq's full-sized avatar
🎯
Focusing

Dave C ccwq

🎯
Focusing
View GitHub Profile
@jinjier
jinjier / javdb-top250.md
Last active November 19, 2024 13:18
JavDB top 250 movies list. [Updated on 2024/11]
@Yimiprod
Yimiprod / difference.js
Last active November 1, 2024 06:18
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@ccwq
ccwq / Apache或者xmapp配置域名并跳转到特定目录
Last active August 29, 2015 14:10
Apache或者xmapp配置域名并跳转到特定目录
Apache或者xmapp配置域名并跳转到特定目录
1.在/conf/extra/httpd-vhosts.conf中(或者直接写到httpd.conf)增加
<VirtualHost *:80>
DocumentRoot "E:/http/sanyou_cc"
ServerName "sanyou.cc"
</VirtualHost>
可以参考42行之前的举例,这里需要注意的是,apache的配置,不能用tab,不然会报错
如果端口好不为80可以在httpd.conf中增加
Listen 80
@ccwq
ccwq / html有用的但难记代码片段
Last active August 29, 2015 14:08
html有用的但难记代码片段
1.强制按照ie7的模式来渲染,无视doc头声明,和兼容性设置
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
2.强制按照ie当前版本来渲染,同上。
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
3.直接跳转
<meta http-equiv="refresh" content="0;url=pathtojump"/>
4.禁止网页在移动设备上的缩放(非强制禁止)
@hehongwei44
hehongwei44 / parseURL.js
Created June 30, 2014 07:26
js通过a标签解析url
/*
* @function: 通过a标签解析url标签
* @param:url url参数是字符串,解析的目标
通过IE6-9 chrome Firefox测试
*
*/
function parseURL(url) {
//创建一个a标签
var a = document.createElement('a');
@bennadel
bennadel / assign.less
Created June 5, 2014 16:02
Executing JavaScript In The LESS CSS Precompiler
@foo: `javascript` ;
@vojtajina
vojtajina / all-templates.html
Created August 15, 2012 00:00
AngularJS: load all templates in one file
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>
@minodisk
minodisk / gist:1136327
Created August 10, 2011 07:54
Get server time with AJAX
$(function () {
$.ajax({
type: 'GET',
cache: false,
url: location.href,
complete: function (req, textStatus) {
var dateString = req.getResponseHeader('Date');
if (dateString.indexOf('GMT') === -1) {
dateString += ' GMT';
}