Skip to content

Instantly share code, notes, and snippets.

View dingyi's full-sized avatar
🏠
Working from home

Ding Yi dingyi

🏠
Working from home
View GitHub Profile
@dingyi
dingyi / high-dpi-media.css
Created August 24, 2012 11:51 — forked from marcedwards/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
/* -------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs with IE zoomed in */
/* - Android hdpi devices and above */
/* - Android tvdpi devices, including Google Nexus 7 */
@dingyi
dingyi / gist:3486819
Created August 27, 2012 09:08 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@dingyi
dingyi / Weibo V5
Created September 4, 2012 03:50
Weibo v5
#pl_content_publisherTop,
#pl_leftnav_app,
.WB_right_tips,
.W_rightModule,
.WB_right_module,
.tips_wrapper,
.W_main_r {
display: none;
}
.W_main_l {
@dingyi
dingyi / UIImage+Retina4.h
Created September 14, 2012 22:29 — forked from bstahlhood/UIImage+Retina4.h
Swizzled UIImage imageNamed for iPhone 5
//
// UIImage+Retina4.h
// StunOMatic
//
// Created by Benjamin Stahlhood on 9/12/12.
// Copyright (c) 2012 DS Media Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
@dingyi
dingyi / mq.css
Created October 7, 2012 00:54 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@dingyi
dingyi / dabblet.css
Created October 21, 2012 09:04 — forked from lensco/dabblet.css
box-shadow vs filter: drop-shadow
/**
* box-shadow vs filter: drop-shadow
*/
body {
background: #ddd;
font: 16px/1 sans-serif;
}
div {
margin: 100px;
@dingyi
dingyi / high-dpi-media.css
Created November 20, 2012 03:22 — forked from marcedwards/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs with IE zoomed in */
/* - Android hdpi devices and above */
/* - Android tvdpi devices, including Google Nexus 7 */
@include handhelds {
table.responsive {
width: 100%;
thead {
display: none;
}
tr {
display: block;
}
td, th {
@main-font-size: 16px;
.x-rem (@property, @value) {
// This is a workaround, inspired by https://github.com/borodean/less-properties
@px-fallback: @value * @main-font-size;
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`;
-: ~`(function () { return ';@{property}: @{value}rem'; }())`;
}
(*
The Hit List Mail Import
Copyright © 2012 Potion Factory LLC.
Licensed under a Creative Commons Attribution 3.0 License: http://creativecommons.org/licenses/by/3.0/
To customize this script, copy it first to: