Skip to content

Instantly share code, notes, and snippets.

View Gaubee's full-sized avatar
🫐
Growing

Gaubee Gaubee

🫐
Growing
View GitHub Profile
@Gaubee
Gaubee / baidu_music_no_ad.css
Created September 28, 2013 06:08
my Stylish
/*play.baidu.com*/
.mb-layout-bd.column4{
display:none;
width: 0px;
}
.mb-layout-bd.column3{
right:0px;
}
.mb-layout-bd.column2{
right: 250px;
@Gaubee
Gaubee / rAF.js
Last active December 25, 2015 14:29 — forked from paulirish/rAF.js
// MIT license
(function() {
"use strict"
var G = window,
lastTime = 0,
vendors = ['ms', 'moz', 'webkit', 'o'],
_KEY_AnimationFrame = 'AnimationFrame',
_KEY_equest = 'equest',
_KEY_ancel = 'ancel',
_KEY_requestAnimationFrame = 'r' + _KEY_equest + _KEY_AnimationFrame,
@Gaubee
Gaubee / Default (Windows).sublime-keymap
Created October 19, 2013 11:41
选中的数字值累加1
[
{ "keys": ["shift+f1"], "command": "increment_selection" }
]
.pull-quote {
background: -webkit-linear-gradient(top,green 0,red 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@Gaubee
Gaubee / Emmet操作快捷键
Created October 25, 2013 13:06
前端开发Lab » Emmet使用教程
展开缩写 – Tab or Ctrl+E
互动式展开缩写 — Ctrl+Alt+Enter
标签对匹配外 – Ctrl+,
标签对匹配内 – Shift+Ctrl+0
对匹配– Ctrl+Alt+J
使用缩写包裹 — Shift+Ctrl+G
转到编辑点 — Ctrl+Alt+→ or Ctrl+Alt+←
选择项目– Shift+Ctrl+. or Shift+Ctrl+,
切换注释— Shift+Ctrl+/
拆分/加入标签 — Shift+Ctrl+`
@Gaubee
Gaubee / head-mate.html
Last active December 26, 2015 16:18
网页头部
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>标题</title>
<meta name="description" content="描述">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FUCK 360 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">
@Gaubee
Gaubee / jquery.printPage.js
Created December 5, 2013 05:46
开源的javascript实现页面打印功能,兼容所有主流浏览器(Chorme,Firefox,IE10,9,8,7,Opera,360安全(急速和兼容模式))
/**
* jQuery printPage Plugin
* @version: 1.0
* @author: Cedric Dugas, http://www.position-absolute.com
* @licence: MIT
* @desciption: jQuery page print plugin help you print your page in a better way
*/
(function($) {
$.fn.printPage = function(options) {
@Gaubee
Gaubee / php.md
Last active December 30, 2015 13:49
关于PHP开发环境安装

基础安装流程教程:Apache+php+mysql在windows下的安装与配置图解

到官方网站下载PHP安装包或者压缩包时,需要下载TS版本(线程安全),否则在配置Apache模块时会找不到 php5apache2_2.dll 这个模块文件,另外系统中需要有 Visual C++ 2008 SP1 ,一般电脑中都会有的,只是服务器上如果长期没更新可能就缺了这东西。

至于MySql的下载和安装,建议还是用MSI文件进行配置安装,Google mySQL installer就可以找到,ZIP程序包自然也可以,只是需要手动配置,得折腾时间,不过这些图形安装界面可能要依赖于.net Framework框架。一般服务器上是有的。

在安装ECSHOP时遇到了一些问题,上官看了一下,官方要求php版本最好是5.2(5~5.3),我上次下载安装的是5.3,官方网站已经把5.2以下的在下载页面中给刷下去了,找到相关的下载地址: 5.2.17 MSI文件 (推荐) 5.2.17 ZIP文件

<?php
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
$username = $mysql_config["username"];
$password = $mysql_config["password"];
$hostname = $mysql_config["hostname"];
$port = $mysql_config["port"];
$db = $mysql_config["name"];
$link = mysql_connect("$hostname:$port", $username, $password);