Skip to content

Instantly share code, notes, and snippets.

View trongthanh's full-sized avatar
🎈
Keep calm and code on

Thanh Tran trongthanh

🎈
Keep calm and code on
View GitHub Profile
@trongthanh
trongthanh / dabblet.css
Created May 10, 2012 06:42
Animated 3D Stereo Images with CSS3
/**
* Animated 3D Stereo Images with CSS3
* Author: Thanh Tran (int3ractive.com)
*/
.image1 {
background: url(http://labs.int3ractive.com/javascript/effects/stereo-images/img/DSC_0192.jpg) no-repeat;
width: 512px;
height: 769px;
}
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@trongthanh
trongthanh / demo.html
Created July 12, 2012 03:30
Google Swiffy Hacks
Visit: http://jsfiddle.net/ttt_conan/bzqnu/ for live demonstration
@trongthanh
trongthanh / dabblet.css
Created March 17, 2013 06:53
Flex-box playground
/**
* Flex-box playground
*/
body { font: 2em sans-serif; }
.s1 { font-size: 1em; }
.s2 { font-size: 2em; }
.s3 { font-size: 1.5em; }
.box {
background: #ffcccc;
@trongthanh
trongthanh / dabblet.css
Created May 15, 2013 08:11
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.box {
width: 200px;
height: 200px;
background: rgba(255,0,255, 0.2);
}
@trongthanh
trongthanh / dabblet.css
Created May 15, 2013 08:13
Animated 3D Stereo Images with CSS3 (Enhanced with Steps)
/**
* Animated 3D Stereo Images with CSS3 (Enhanced with Steps)
* Author: Thanh Tran (int3ractive.com)
* Blog post: http://blog.int3ractive.com/2012/05/cave-3d-stereo-images-2-state-looping.html
* Older solution (without steps() function): http://dabblet.com/gist/2651495
* Note: prefix-free in use
*/
.image1 {
background: url(http://labs.int3ractive.com/javascript/effects/stereo-images/img/DSC_0192.jpg) no-repeat;
@trongthanh
trongthanh / dabblet.css
Created July 27, 2013 04:52
Demo: Fixed Web Font padding issues on Mac/Linux/Android
/*
Demo: Fixed Web Font padding issues on Mac/Linux/Android
Blog post: http://blog.int3ractive.com/2013/07/fixing-web-fonts-padding-issues-on-linux-mac.html
*/
@font-face {
font-family: 'HelveticaLight'; font-weight: normal; font-style: normal;
src: local('☺'), url('https://github.com/trongthanh/trongthanh.github.com/blob/master/css/webfonts-padding-fix/HelveticaNeue-Light.woff?raw=true') format('woff');
}
@font-face {
font-family: 'HelveticaLightFixed'; font-weight: normal; font-style: normal;
@trongthanh
trongthanh / dabblet.css
Created June 24, 2014 15:41
Essential CSS Training - Cascading & Specificity
/**
* Essential CSS Training - Cascading & Specificity
*/
html {
font-family: sans-serif;
font-size: 200%;
}
.blue {
color: blue;
/**
* Float Demo
*/
html {
font-family: sans-serif;
font-size: 150%;
color: #666;
}
.container {
@trongthanh
trongthanh / dabblet.css
Last active August 29, 2015 14:03
Clear Fix Demo
/**
* Clear Fix Demo
*/
html {
font-family: sans-serif;
font-size: 150%;
}
.container {
background: #aaddaa;