(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import os | |
| import sys | |
| import traceback | |
| from functools import wraps | |
| from multiprocessing import Process, Queue | |
| def processify(func): | |
| '''Decorator to run a function as a process. | |
| Be sure that every argument and the return value |
| #!/bin/bash | |
| NAME="hello_app" # Name of the application | |
| DJANGODIR=/webapps/hello_django/hello # Django project directory | |
| SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
| USER=hello # the user to run as | |
| GROUP=webapps # the group to run as | |
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
| DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
| DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| cat .gitignore | sed 's/^/\.\//g;s/\(.*\)\/\([0-9a-zA-Z\*\?\.]*\)$/svn propedit svn:ignore "\2" \1 /mg' | bash |
| // @credit: http://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer | |
| // From Buffer to ArrayBuffer: | |
| function toArrayBuffer(buffer) { | |
| var ab = new ArrayBuffer(buffer.length); | |
| var view = new Uint8Array(ab); | |
| for (var i = 0; i < buffer.length; ++i) { | |
| view[i] = buffer[i]; | |
| } |
| sudo apt-get install python-virtualenv python-dev postgresql-client libldap2-dev libsasl2-dev libssl-dev libpq-dev | |
| # python-virtualenv - virtualenv | |
| # python-dev - compile python | |
| # libldap2-dev libsasl2-dev libssl-dev - for python-ldap | |
| # libpq-dev - psycopg2 | |
| ../ootest-env/bin/python setup.py develop | |
| ../ootest-env/bin/pip install pypdf # https://github.com/odoo/odoo/pull/1757 | |
| $ sudo apt-get install postgresql |
Link to nicer article view on the old Railslove.com (may break any time):
http://railslove-website.herokuapp.com/blog/2012/11/09/taking-sass-to-the-next-level-with-smurf-and-extend
title: Taking Sass to the Next Level with SMURF and @extend slug: taking-sass-to-the-next-level-with-smurf-and-extend author: jakob_hilden featured_image: https://dl.dropbox.com/u/409736/smurf_blog_background.png published: true published_at: 2012-11-09
As many of you know I have been on a quest to get Jetpack core development moved from the WordPress.org Subversion (svn) repository to Github (git). As part of this process I setup an experimental Jetpack repository to see how synchronization works between git and svn. Lets just clear the air right now and say not well, not well at all. This is due to how git and svn each store their respective histories. But! I think I finally have it figure out.
I wrote an article a couple months ago entitled Creating a synchronized Github fork of a WordPress.org Subversion plugin repository. This article is great (and still a recommended read) if you are only doing synchronization b
| #!/usr/bin/python | |
| # A simple script to convert an LDIF file to DOT format for drawing graphs. | |
| # Copyright 2009 Marcin Owsiany <marcin@owsiany.pl> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, |
| # delete all data | |
| curl -XDELETE localhost:9200/test | |
| # create an index and define specific french stop_words | |
| curl -XPUT localhost:9200/test -d '{ | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { | |
| "analyzer" : { | |
| "french" : { |