Skip to content

Instantly share code, notes, and snippets.

View vinhnx's full-sized avatar

Vinh Nguyen vinhnx

View GitHub Profile
@vinhnx
vinhnx / gist:3617874
Created September 4, 2012 07:05
oh-my-zsh configuration
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="vinhnx"
@vinhnx
vinhnx / gist:3617881
Created September 4, 2012 07:06
vinhx.zsh-theme
PROMPT='%{$fg_bold[yellow]%}%1~/$(git_prompt_info)
%{$fg_bold[white]%}» %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}* "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}•"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}•"
@vinhnx
vinhnx / gist:3653160
Created September 6, 2012 08:40
upstream - keep track of origin
# UPSTEAM
# ... Use the following commands to add the 'upsteam' (original project location) as a remote branch
# so that you can get their updates into your branch.
# Replace the 'upstreamname' and 'projectname' values with that actual user/project name that you're trying to track.
# http://gun.io/blog/how-to-github-fork-branch-and-pull-request/
--
# add origin project as a remote name `upstream`
git remote add --track master upstream git://github.com/upstreamname/projectname.git
# get the code from `upstream`
@vinhnx
vinhnx / index.html
Created September 10, 2012 12:53
Use the controls to switch views. Works better in webkit, buggy in FF, flat in IE. Inspired by http://neography.com/experiment/circles/solarsystem/ and http://nicolasgallagher.com/css-pseudo-element-solar-system/demo/ WIP, I will share the full SASS pro
<body class="view-2D zoom-large opening hide-UI">
<h1>3D CSS Solar System</h1>
<div id="subnav" class="sub nav">
<a class="sun" title="sun" href="#sunspeed">Sun</a>
<a class="mercury" title="mercury" href="#mercuryspeed">Mercury</a>
<a class="venus" title="venus" href="#venusspeed">Venus</a>
<a class="earth active" title="earth" href="#earthspeed">Earth</a>
<a class="mars" title="mars" href="#marsspeed">Mars</a>
<a class="jupiter" title="jupiter" href="#jupiterspeed">Jupiter</a>
<a class="saturn" title="saturn" href="#saturnspeed">Saturn</a>
@vinhnx
vinhnx / gist:3719469
Created September 14, 2012 02:33
oh-my-themes vinh.zsh-theme (default)
PROMPT='%{$fg_bold[yellow]%}%1~/$(git_prompt_info)
%{$fg_bold[white]%}» %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}* "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}•"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}•"
@vinhnx
vinhnx / iphone5.css
Created September 14, 2012 03:44
iPhone5 @media queries
@media only screen and (min-width: 560px) and (max-device-width: 1136px) {
/* awesome style */
}
@vinhnx
vinhnx / gist:3719694
Created September 14, 2012 03:54
vinhnx-zsh.theme (alternative)
PROMPT='%{$fg_bold[yellow]%}%1~/$(git_prompt_info) %{$fg_bold[white]%}$ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}* "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}•"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}•"
@vinhnx
vinhnx / test.js
Created September 15, 2012 04:56
function Car(listedPrice) {
var price = listedPrice;
this.speed = 0;
this.numWheels = 4;
this.getPrice = function() {
return price;
};
}
@vinhnx
vinhnx / index.haml
Created September 18, 2012 08:45
This is a WIP. I explain why later. I recreated the 10.6 Finder almost 2 years ago. At that time a lot of people recreated a bunch of elements from the Mac UI in CSS3. Like the dock or various kinds of aqua buttons, etc. I decided to make the Finder to l
#finder
#toolbar
#traffic-light
#red
#yellow
#green
#windowname
%i
All My Files
#actions
@vinhnx
vinhnx / index.haml
Created September 18, 2012 08:48
No pseudo-elements just gradients.
- (1..3).each do |i|
%div hello