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 |
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 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" |
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
`echo $SHELL` --version |
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
# 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
# DOSBox is a great emulator to run old DOS games | |
# and applications. | |
# This configuration has been tested on Ubuntu 11.04 with DOSBox 0.74 | |
# but# it should work on other distros too. | |
# This code snippet runs on a fresh install of DOSBox | |
# since it appends lines to DOSBox configuration file. | |
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
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
# 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 |
OlderNewer