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
SKIP_COMMANDS = [ | |
'migrate', | |
'syncdb', | |
] | |
if any([command in sys.argv for command in SKIP_COMMANDS]): | |
HAYSTACK_ENABLE_REGISTRATIONS = False |
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
Connect HTC Desire via USB cable. | |
Make sure USB debugging is enabled. | |
$ cd /path/to/android/sdk/tools | |
$ adb push busybox /sdcard/busybox | |
$ adb reboot recovery | |
The phone should restart in recovery mode. | |
$ adb shell |
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
[user] | |
name = Moises Brenes | |
email = moises.brenes@gmail.com | |
[color] | |
ui = auto | |
[core] | |
excludesfile = /home/gin/Projects/weird/.gitignore | |
editor = vim |
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
DJANGO_VERSION=1.4; | |
cd ${OPENSHIFT_REPO_DIR}/wsgi/static; | |
ln -s ${OPENSHIFT_GEAR_DIR}/virtenv/lib/${OPENSHIFT_GEAR_TYPE}/site-packages/Django-${DJANGO_VERSION}-py2.6.egg/django/contrib/admin/static/admin/ admin; | |
exit; |
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
ssh $youruuid@vendejo-$yournamespace.rhcloud.com | |
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate | |
python $OPENSHIFT_REPO_DIR/wsgi/openshift/manage.py createsuperuser |
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/bash | |
# original string, with spaces | |
my_var=" Fuck You! . "; | |
echo $my_var; | |
# the function | |
function trim() { | |
local string=$@; | |
string=${string//[[:space:]]}; |
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: utf-8 -*- | |
class CObject(object): | |
def __init__(self, map): | |
if isinstance(map, (list, tuple)): | |
map = dict(enumerate(map)) | |
if isinstance(map, dict): | |
for key, val in map.iteritems(): | |
key = str(key) |
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
# Testing | |
deb http://ftp.us.debian.org/debian/ testing main contrib non-free | |
deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free | |
# Stable | |
# deb http://ftp.us.debian.org/debian/ stable main contrib non-free | |
# deb-src http://ftp.us.debian.org/debian/ stable main contrib non-free | |
# Security | |
deb http://security.debian.org/ testing/updates main contrib non-free |
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
stat --format=%a path/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
PHP Extensions "0" must be loaded. | |
http://www.magentocommerce.com/boards/viewthread/284882/#t410289 | |
The problem seems to be in wrong version PHP SimpleXML extension. Here’s another workaround: | |
Replace in file app/code/core/Mage/Install/etc/config.xml (near 71th string) this | |
<extensions> | |
<pdo_mysql/> | |
</extensions> |
OlderNewer