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
try | |
source $HOME/_vimrc_local | |
catch /^Vim\%((\a\+)\)\=:E484/ | |
endtry |
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
if has("win16") || has("win32") || has("win64") | |
else | |
endif |
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
import datetime | |
def get_datetimestamp(sep_date="", sep_group="_", sep_time="", moment=None): | |
""" | |
Returns string representation of datetime objects. | |
By default, the value will look like "20121212_120102" and it | |
is safe to use it on file names. |
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 this file as .bash_profile, or merge with the existing one. | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
# Red Hat Enterprise Linux Server release 6.3, x84_64 | |
# Oracle Client 11.2.0 (not Instant Client) | |
# Python 2.6 |
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
python -m SimpleHTTPServer 8090 |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
</startup> | |
<appSettings> | |
<add key="one" value="1"/> | |
<add key="two" value="2"/> | |
<add key="three" value="3"/> | |
<add key="four" value="4"/> |
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
# http://docs.python.org/reference/datamodel.html?highlight=__file__ | |
# Current module name | |
print __file__ | |
# module1.py | |
# Path of the current module | |
import os | |
print os.path.abspath(os.path.dirname(__file__)) | |
# /home/myusername/projects/project1 |
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
import sys | |
def is_ironpython(): | |
""" | |
If the platform is IronPython, this function returns True, False otherwise. | |
""" | |
result = False | |
if sys.platform == "cli": | |
result = True | |
return result |
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
# -*- coding: utf8 -*- | |
# http://www.python.org/dev/peps/pep-0263/ |
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
uname -a | |
cat /etc/redhat-release |