<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "mobile.html";
}
//-->
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
#Rosetta Code | |
for x in range(1, 101): | |
print ''.join(['' if x%3 else 'fizz', '' if x%5 else 'buzz']) or x | |
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
# Show git branch in bash prompt | |
__git_ps1 () | |
{ | |
local b="$(git symbolic-ref HEAD 2>/dev/null)"; | |
if [ -n "$b" ]; then | |
printf " (%s)" "${b##refs/heads/}"; | |
fi | |
} | |
alias la='ls -A' | |
alias ll='ls -l' |
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
#!/bin/sh | |
# | |
# This shell script passes all its arguments to the binary inside the | |
# MacVim.app application bundle. If you make links to this script as view, | |
# gvim, etc., then it will peek at the name used to call it and set options | |
# appropriately. | |
# | |
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This | |
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico | |
# Weber and Bjorn Winckler, Aug 13 2007). |
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
# bash prompt | |
if [ -n "$SSH_CONNECTION" ] ; then | |
export PS1="\[\033[G\]\[\033[0;32m\]\u@\h\[\033[0;32m\] \w\$(__git_ps1) \$\[\033[00m\] " | |
else | |
if [ "$USER" != "baopham" ] ; then | |
export PS1="\[\033[G\]\[\033[0;32m\]\u \w\$(__git_ps1) \$\[\033[00m\] " | |
else | |
export PS1="\[\033[G\]\[\033[0;32m\]\w\$(__git_ps1) \$\[\033[00m\] " | |
fi | |
fi |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
# GistID: 2304197 | |
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
# Enable the 2D Dock | |
defaults write com.apple.dock no-glass -bool true |
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
/* Opacity */ | |
filter:alpha(opacity=95); /* For IE */ | |
-moz-opacity:0.95; /* Older versions of Mozilla */ | |
-khtml-opacity: 0.95; /* For Sarari 1.x */ | |
opacity: 0.95; /* General Usage */ |
In versions of Rails before 3.0 (including 3.0 itself), static assets lived in the public/ directory, as follows:
public/stylesheets
public/javascripts
public/images
Files in these directories are (even post-3.0) automatically served up via requests to http://example.com/stylesheets, etc.
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
PS1="\[\033[G\]$PS1" |
OlderNewer