Skip to content

Instantly share code, notes, and snippets.

View jorgeas80's full-sized avatar
🎯
Focusing

Jorge Arévalo jorgeas80

🎯
Focusing
View GitHub Profile
@jorgeas80
jorgeas80 / basic_sass_features.md
Created November 5, 2016 15:23 — forked from blackfalcon/basic_sass_features.md
Exercises in basic Sass features

Sass is a powerhouse language that is adding new features all the time. For this introduction we will go over the basics of the language and see how they all tie together. We will discuss nesting, parent selector definitions, variables, Sass math, @extends, and @mixins.

Code comments

Commenting your code is the number one awesome thing any developer can do. In CSS you can place comments in your code /* */, but this will appear in the actual CSS and sometimes you don't want or need all that stuff to be there.

In Sass comments are highly encouraged. Sass has what are called 'silent comments' using the // syntax. This will allow the developer to comment like crazy and none of this is exposed in the final CSS. An interesting feature is that Sass supports both types of comments.

Scss

@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>
@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 / 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 / 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

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 / 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"]
@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
# 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 / 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.#'),