This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
.box { | |
width: 200px; | |
height: 200px; | |
background: rgba(255,0,255, 0.2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flex-box playground | |
*/ | |
body { font: 2em sans-serif; } | |
.s1 { font-size: 1em; } | |
.s2 { font-size: 2em; } | |
.s3 { font-size: 1.5em; } | |
.box { | |
background: #ffcccc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using vim | |
:%s/-\(.\)/\U\1/g | |
# Explain: Search for pattern -(.) and turn uppercase the first group \U\1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# save current changes (if any) to stash | |
git stash save | |
# pull remote changes to local | |
git pull origin | |
# apply stash and try auto merge | |
git stash pop | |
# OR | |
git stash apply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Can use a short revision id (3ec090f) in place of master to export a specific revision | |
git archive --format zip --output ../zipfile.zip master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find . -name '.svn' -exec rm -R -f '{}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function createContextMenu(versionString: String): void { | |
if (!contextMenu) contextMenu = new ContextMenu(); | |
contextMenu.hideBuiltInItems(); | |
var versionMenu: ContextMenuItem = new ContextMenuItem("v." + versionString, false, false); | |
contextMenu.customItems = [versionMenu]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# log my computer IP to a file shared on Ubuntu One | |
/sbin/ifconfig $1 | grep "inet addr" | gawk -F: '{print $2}' | gawk '{print $1}' > "/home/thanh/Ubuntu One/office_ip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert to MP4 video | |
ffmpeg -i output.mov -s 1280x720 -b 2000k -ab 128k -vcodec libxvid -acodec libmp3lame -sws_flags +bitexact final.mp4 | |