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 / Gruntfile.js
Created August 18, 2014 10:36
Working with HTML Forms Demo
/*jshint node: true*/
module.exports = function (grunt) {
'use strict';
// mannual grunt task loading:
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
// install and turn on package below to automatically load grunt tasks listed in the initConfig
// require('load-grunt-tasks')(grunt);
@trongthanh
trongthanh / dabblet.css
Created October 23, 2014 07:19
Position Property & Absolute Positioning Context Demo
/**
* Position Property & Absolute Positioning Context Demo
*/
div {
padding: 10px;
}
.main {
width: auto;
border: 5px solid lightgreen;
background-color: AliceBlue;
@trongthanh
trongthanh / dabblet.css
Created December 10, 2014 04:37 — forked from oli/dabblet.css
Animations plus animations/transitions
/* Animations plus animations/transitions */
/* ref: http://mattwilcox.net/sandbox/css3-animations-1/index.htm */
/* also ref: http://css-tricks.com/restart-css-animation/ */
.animate-on-load {animation: bgcolor 3s;}
.animate-on-hover:hover {animation: bgcolor 3s;}
.animate-on-hover2:hover {animation: bgcolor2 3s;} /* change anim name */
.animate-on-hover3:hover {animation: bgcolor 2.9s;} /* change duration */
.animate-on-hover4:hover {animation: bgcolor 3s 2;} /* change iteration-count */
.transition-on-hover {transition: background-color 2s;}
.transition-on-hover:hover {background-color: #777;}
@trongthanh
trongthanh / vn-front-end-libraries.md
Last active August 29, 2015 14:13
Front End Libraries by Vietnamese Developers

I'm not recommending nor disapproving any of these libraries. I'm listing these libraries / frameworks for just the fact that they were created by Vietnamese developers and I respect them for their hardwork and sharing with community:

  1. HTMLJS by nhanfu: A MVVM framework
  2. jQuery.longShadow by dangvanthanh: A jQuery plugin to create long casting shadows on text
  3. SickelS by singggum3b: A responsive web framework
@trongthanh
trongthanh / gist:799860
Created January 28, 2011 05:05
convert video to mp4 format
# convert to MP4 video
ffmpeg -i output.mov -s 1280x720 -b 2000k -ab 128k -vcodec libxvid -acodec libmp3lame -sws_flags +bitexact final.mp4
@trongthanh
trongthanh / gist:819927
Created February 10, 2011 04:05
Log my computer IP to a file shared on Ubuntu One
# 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"
@trongthanh
trongthanh / gist:954886
Created May 4, 2011 07:43
Create Flash context menu
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];
}
@trongthanh
trongthanh / clear_svn.sh
Created October 18, 2011 06:16
Search for .svn folders and remove them. (Remove all subversion metadata folders)
$ find . -name '.svn' -exec rm -R -f '{}' \;
@trongthanh
trongthanh / gist:1823062
Created February 14, 2012 03:09
export a git revision
# Can use a short revision id (3ec090f) in place of master to export a specific revision
git archive --format zip --output ../zipfile.zip master
@trongthanh
trongthanh / gist:2048765
Created March 16, 2012 06:21
Git commands to pull remote and merge with current branch
# 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