Skip to content

Instantly share code, notes, and snippets.

View jorgeas80's full-sized avatar
🎯
Focusing

Jorge Arévalo jorgeas80

🎯
Focusing
View GitHub Profile
{
"basics": {
"name": "Jorge Arevalo",
"label": "Python/Django Web Developer",
"summary": "I’m a software developer since 2007. Specialized in web development with Python and Django. Previous experience with C as developer of GDAL PostGIS Raster driver and PostGIS Raster extension. Also experience as tech trainer.",
"website": "https://about.me/jorgeas80",
"email": "jorgeas80@tuta.io",
"location": {
"city": "Madrid",
"countryCode": "ES"
@jorgeas80
jorgeas80 / celery.sh
Created June 18, 2018 13:23 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
# I have followed PyImageSearch tutorial http://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/
# Ubuntu upgrade & update current libraries
sudo apt-get update
sudo apt-get upgrade
# Install dependancies
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
@jorgeas80
jorgeas80 / initial_data.sh
Created May 12, 2017 11:13
Django dumpdata for initial data fixtures
python manage.py dumpdata app_name --indent=4 > initial_data.json
@jorgeas80
jorgeas80 / buzzfeedNews_spider.py
Created December 30, 2016 18:41 — forked from nikhilpi-zz/buzzfeedNews_spider.py
Scrapy Scraper for Buzzfeed
import scrapy
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.lxmlhtml import LxmlLinkExtractor
from buzzLinks.items import BuzzlinksItem
from urlparse import urlparse
# Spider
class DmozSpider(CrawlSpider):
name = "buzzfeedNews"
allowed_domains = ["buzzfeed.com"]
echo "manual" | sudo tee -a /etc/init/mysql.override
sudo update-rc.d -f apache2 remove
# then, to start manually
# sudo service apache2 start
# sudo service mysql start
@jorgeas80
jorgeas80 / README.md
Created December 17, 2016 06:21 — forked from brunogaspar/README.md
Install wkhtmltopdf on Ubuntu 14.04 64-bit

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Step 1

Install the xvfb server by running

@jorgeas80
jorgeas80 / models.py
Created November 28, 2016 23:58 — forked from fabiomontefuscolo/models.py
Let the Django FileField overwrite files with the same name
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from django.db import models
class OverwriteStorage(FileSystemStorage):
'''
Muda o comportamento padrão do Django e o faz sobrescrever arquivos de
mesmo nome que foram carregados pelo usuário ao invés de renomeá-los.
'''
@jorgeas80
jorgeas80 / .gitignore
Created November 25, 2016 13:34 — forked from fafaradesigns/.gitignore
WebDev:Gitignore File
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.sass-cache*
@jorgeas80
jorgeas80 / ng.location.test.html
Created November 11, 2016 09:40 — forked from siberex/ng.location.test.html
AngularJS location provider example
<!doctype html>
<html lang="en"
xmlns:ng="http://angularjs.org" id="ng-app" ng-app="awesomeApp"
ng-strict-di="">
<head>
<title>Location test</title>
<base href="/ng.location.test.html/">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>