30 Jun, 15

Creating Custom Template Filter That Injects Adsense Ad Code After N Paragraph in Django

Injecting ads inside content is a very effective technique. Let's say you want to inject Adsense ad after first paragraph of text. To add such capability to our Django based website we need to create a custom filter for that. I'll tell you how to implement such a filter.

1 ...

Read now
25 Jun, 15

Do You Know That You Might Not Need jQuery? #javascript #jquery http://youmightnotneedjquery.com/

24 Jun, 15

Here's one more cool tool: http://gitignore.io let's you create useful .gitignore files for your project. It even has CLI integration!

24 Jun, 15

Easy data binding for #jQuery: http://jquerymy.com/ #javascript

24 Jun, 15

#CSS generator for centering text/div depending on their size or the container size http://howtocenterincss.com/ <- awesome tool!

22 Jun, 15

ECMAScript 6: New Features: Overview and Comparison #javascript http://es6-features.org/#Constants

04 Jun, 15

Elasticsearch fails with error "This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (ulimit)". What to do?

Well, basically, that means you have too low memlock limit setting in your OS. This can be easily fixed in two steps:

1) Edit /etc/security/limits.conf file and add to the end:

  1. * hard memlock unlimited
  2. * soft memlock unlimited

2) Add a line in the /etc/pam ...

Read now
03 Jun, 15

#Django models, encapsulation and data integrity #gold http://www.dabapps.com/blog/django-models-and-encapsulation/

02 Jun, 15

Snippet: Setting HTTP_AUTH in Apache2

  1. # Put these lines inside <Directory> tag of your virtual host file:
  2. AuthType Basic
  3. AuthName "Private Club Entrance"
  4. AuthUserFile /var/www/example.com/.htpasswd
  5. Require valid-user
  6. # Create a new user via command:
  7. htpasswd -c /var/www/example.com/.htpasswd username
Read now
29 May, 15

What does dad do when his wife and son sleep on friday night? Well, he updates his open-source packages ;) https://github.com/timonweb/djow #django