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
diff -qrbB magento_folder client_folder |
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
lynx -dump -head http://url-to-resource.com/path.jpg |
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 | |
/** | |
* $url can equal any of the following URL formats: | |
* | |
* http://www.domain.com | |
* https://www.domain.net | |
* http://subdomain.domain.org | |
* www.domain.com/folder | |
* subdomain.domain.net | |
* subdomain.domain.edu/folder/subfolder |
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
sudo easy_install pip | |
sudo pip install django | |
sudo pip install django-extensions | |
# postgres support | |
sudo pip install psycopg2 | |
# on mountain lion, edit postgres conf file for custom socket | |
sudo vi /usr/local/var/postgres/postgresql.conf | |
# update unix_socket_directory |
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
# create symlink to solve missing directory on mountain lion | |
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain | |
# install mod with brew | |
brew install mod_wsgi | |
# add this line to httpd.conf and restart apache | |
LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/3.3/libexec/mod_wsgi.so | |
sudo apachectl restart |
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
brew install postgres --without-ossp-uuid | |
initdb /usr/local/var/postgres | |
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
def obj_get_list(self, request=None, **kwargs): | |
if 'area' in request.GET and request.GET['area'] and 'item' in request.GET and request.GET['item']: | |
area_val = request.GET['area'] | |
item_val = request.GET['item'] | |
queryset = ItemToArea.objects.filter(area=area_val,item=item_val) | |
return queryset | |
if 'area' in request.GET and request.GET['area']: | |
area_val = request.GET['area'] | |
queryset = ItemToArea.objects.filter(area=area_val) | |
return queryset |
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 | |
/* | |
Given: | |
<foo_bar_baz> | |
<schedule> | |
<cron_expr>0 0 * * *</cron_expr> | |
</schedule> | |
<run> | |
<model>foo/bar::baz</model> | |
</run> |
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
sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/domain.com.key -out /etc/pki/tls/private/domain.com.csr |
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
alias gitsync="git fetch upstream && git merge upstream/develop && git push origin develop" |