Thursday, May 1, 2014
Wednesday, April 23, 2014
Enable syslog server on Mavericks
http://stackoverflow.com/questions/5510563/how-to-start-syslogd-server-on-mac-to-accept-remote-logging-messages
Tuesday, April 22, 2014
Installing geoip to mavericks
http://www.krishnasunuwar.com.np/2014/02/installation-maxmind-geoip-python-library-in-os-x-10-9-mavericks/
Steps to installing GeoIP for django
1. Install C Library
2. Download binary database and put it in share folder
3. Download python library GeoIP 1.3.1 (pip install geoip)
4. Configure Django settings.py
'django.contrib.gis',
Steps to installing GeoIP for django
1. Install C Library
2. Download binary database and put it in share folder
3. Download python library GeoIP 1.3.1 (pip install geoip)
4. Configure Django settings.py
'django.contrib.gis',
Wednesday, February 5, 2014
Tuesday, February 4, 2014
OSSIM Custom Collectors
http://santi-bassett.blogspot.com/2012/09/hands-on-3-creating-custom-ossim-plugin.html
Wednesday, January 29, 2014
Monday, January 27, 2014
Monday, January 20, 2014
Monday, November 4, 2013
Tuesday, October 29, 2013
Tastypie valid lookups
exact
iexact
contains
icontains
in
gt
gte
lt
lte
startswith
istartswith
endswith
iendswith
range
year
month
day
week_day
isnull
search
regex
iregex
Ex:
class ThemeResource(ModelResource):
class Meta:
allowed_methods = ['get', 'put']
queryset = Theme.objects.all()
resource_name = 'theme'
filtering = {
'name': ['exact', 'icontains'],
'id':('exact'),
}
http://local.test:8000/api/v1/theme/?format=json&name__icontains=agenda
Monday, October 28, 2013
django Incorrect string value for object_repr
http://stackoverflow.com/questions/11497744/django-mysql-unicode-errors
ALTER TABLE django_admin_log MODIFY object_repr VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;
Wednesday, October 16, 2013
Showing collation and setting collation MySQL
mysql> show full columns from [table];
ALTER TABLE [table] CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
Thursday, September 26, 2013
Load iOS 6.1 SDK into XCode5
- Find the SDK file, like iPhoneOS6.1.sdk, in your or your friend's older Xcode directory.
- Sym link the old SDK to the new XCode5 app directory:
- ln -s /Applications/Xcode4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
Thursday, August 15, 2013
RabbitMQ Installing rabbitmqadmin
rabbitmq-plugins enable rabbitmq_management
Restart rabbitmq server:
rabbitmqctl stop
./rabbitmqctl-server
Download rabbitmq_management from:
http://[server]/cli/
Friday, August 2, 2013
Django filter on multiple object IDs
https://docs.djangoproject.com/en/1.5/topics/db/queries/
# Get blogs entries with id 1, 4 and 7 >>> Blog.objects.filter(pk__in=[1,4,7]) # Get all blog entries with id > 14 >>> Blog.objects.filter(pk__gt=14)
Monday, July 22, 2013
Monday, July 8, 2013
Wednesday, June 26, 2013
misc notes Django Python South migration
#sudo python manage.py migrate [application name]
#sudo python manage.py migrate guidebook
#sudo python manage.py migrate appsub
#sudo python ./manage.py schemamigration appsub --auto
#sudo python manage.py migrate --list
#sudo python manage.py migrate appsubmit
#sudo python manage.py migrate --list
#sudo python manage.py migrate guidebook
#sudo python manage.py migrate appsub
#sudo python ./manage.py schemamigration appsub --auto
#sudo python manage.py migrate --list
#sudo python manage.py migrate appsubmit
#sudo python manage.py migrate --list
Monday, June 24, 2013
ant build problems
Buildfile: /Users/deanliu/Desktop/gb_build/src/android/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
BUILD FAILED
Desktop/gb_build/src/android/build.xml:88: The following error occurred while executing this line:
Desktop/gb_build/src/android/build.xml:51: Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any/ declarations have taken place.
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
BUILD FAILED
Desktop/gb_build/src/android/build.xml:88: The following error occurred while executing this line:
Desktop/gb_build/src/android/build.xml:51: Problem: failed to create task or type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any
Solution:
http://www.coderanch.com/t/506388/tools/failed-create-task-type-undefined
Install ant-contrib:
#sudo port install ant-contrib
Subscribe to:
Posts (Atom)