apt-get update
apt-get upgrade
apt-get install build-essential
SomeRoute: | |
pattern: /someroute | |
defaults: | |
_controller: SomeBundle:Controller:action | |
AnotherRoute: | |
pattern: /anotherroute | |
defaults: | |
_controller: FrameworkBundle:Redirect:redirect | |
route: SomeRoute |
{ | |
"trim_trailing_white_space_on_save": true, | |
"ensure_newline_at_eof_on_save": true, | |
"word_wrap": false, | |
"color_scheme": "Packages/Github Color Theme/GitHub.tmTheme", | |
"ignored_packages": | |
[ | |
"Vintage" | |
] | |
} |
var getYoutubeIdByUrl = function( url ){ | |
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; | |
var match = url.match(regExp); | |
if(match&&match[7].length==11){ | |
return match[7]; | |
} | |
return false; | |
}; |
;(function(global, $) { | |
/**** PARAMETERS BLOCK ************************/ | |
var miniFollowersToIgnore = 0, | |
miniFollowingToKeep = 1000, | |
secondes = Math.floor((Math.random() * 10) + 10), | |
enableBioFilter = false, | |
userBioKeywords = [ | |
'devel', 'code', 'analysis', | |
'cloud', 'unix', 'tech', 'computer', | |
'.net', 'freelance', 'guru', 'UX', |
#!/usr/bin/python | |
# The urlparse module provides functions for breaking URLs down into their | |
# component parts, as defined by the relevant RFCs. | |
from urlparse import urlparse | |
# PARSING | |
parsed = urlparse('http://user:pass@NetLoc:80/path;parameters?query=argument#fragment') |
Create a scrapy exporter on the root of your scrapy project, we suppose the name of your project is my_project
, we can name this exporter: my_project_csv_item_exporter.py
from scrapy.conf import settings
from scrapy.contrib.exporter import CsvItemExporter
class MyProjectCsvItemExporter(CsvItemExporter):
def __init__(self, *args, **kwargs):
delimiter = settings.get('CSV_DELIMITER', ',')
{# | |
this macro is for display all form errors(globals, fields errors) | |
@param is_global have two values 1 and 2 | |
1 => for a global error | |
2 => for a field error | |
#} | |
{% macro all_form_errors(form, is_global) %} | |
{% set is_global = is_global|default(1) %} | |
{% for error in form.get('errors') %} | |
<span style="display: block"> |