Skip to content

Instantly share code, notes, and snippets.

View xxjinwei's full-sized avatar
💻
Working...

Celile Fulwood xxjinwei

💻
Working...
View GitHub Profile
C:\Users\jinwei>npm install totoro
npm http GET https://registry.npmjs.org/totoro
npm http 304 https://registry.npmjs.org/totoro
npm http GET https://registry.npmjs.org/commander/1.2.0
npm http GET https://registry.npmjs.org/express/3.1.0
npm http GET https://registry.npmjs.org/colorful/2.1.0
npm http GET https://registry.npmjs.org/tracer/0.5.1
npm http GET https://registry.npmjs.org/request/2.21.0
npm http GET https://registry.npmjs.org/socket.io-client/0.9.11
http://10.129.157.3:88/s/2.3/projects/profile/styles/applist.css
@xxjinwei
xxjinwei / days.js
Created August 7, 2014 06:19
Number of days in any month
function numberOfDays(year, month) {
var d = new Date(year, month, 0);
return d.getDate();
}
@xxjinwei
xxjinwei / README.md
Last active August 29, 2015 14:07 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@xxjinwei
xxjinwei / flex.css
Last active August 29, 2015 14:08
cross browser flex
.flex-container {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
width: 100%;
}
@xxjinwei
xxjinwei / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@xxjinwei
xxjinwei / v27
Created November 20, 2014 06:53
v27
<script>
if (Math.max(document.documentElement.clientWidth, window.innerWidth || 0) > 820) {
document.documentElement.className += "v27"
}
</script>
@xxjinwei
xxjinwei / gist:95e8c6c8bab71e2a0ed8
Created December 11, 2014 10:24
vertical align middle using margin auto
//works ok ie8+
.middle {
width: 600px; height: 400px;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
margin: auto;
}
@xxjinwei
xxjinwei / border-opacity
Last active August 29, 2015 14:14
border opacity
border-color: rgba(0, 0, 0, .3);
background-clip: padding-box;
@xxjinwei
xxjinwei / notr.js
Created June 30, 2015 08:46
chrome no google translate bar
<meta name="google" value="notranslate">