Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on Neovate Code

chencheng (云谦) sorrycc

🌻
Working on Neovate Code
View GitHub Profile
@sorrycc
sorrycc / gist:1075537
Created July 11, 2011 08:40
scrollbar in pre style
/* Thanks Flyosity! */
/* Ref: http://vunction.com/blog/post/node-and-oauth-and-flickr-oh-my */
pre::-webkit-scrollbar {
width: 8px;
height: 6px;
}
pre::-webkit-scrollbar-button:start:decrement, pre::-webkit-scrollbar-button:end:increment {
display: none;
@sorrycc
sorrycc / gist:939575
Created April 24, 2011 14:32
nignx init.d file
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d dash script for Ubuntu <=9.10.
# Description: nginx init.d dash script for Ubuntu <=9.10.
### END INIT INFO
@sorrycc
sorrycc / browserinfo.js
Created March 29, 2011 05:58
Two way to get browser type[ and version]
var getBrowserInfo = function() {
// Ref: http://www.useragentstring.com/pages/useragentstring.php
var token = [ // 顺序有关
"Opera", // 某些版本会伪装成 MSIE, Firefox
"Chrome", // 某些版本会伪装成 Safari
"Safari", // 某些版本会伪装成 Firefox
"MSIE 6",
"MSIE 7",
"MSIE 8",
"MSIE 9",
@sorrycc
sorrycc / CSS Overflow Test Script
Created February 27, 2011 08:10
CSS Overflow Test Script
/**
* CSS Overflow Test Script
* @author [email protected], @chenchengpro
* @doc http://www.chencheng.org/
*/
(function() {
// Text