This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://pt.stackoverflow.com/a/121085/6267 | |
// Método 1 - um regex bem massa | |
$poligono = array(); | |
$pontos_str = "(-22.891996181150216, -43.127254512695345), (-22.86529776201615, -43.09548266210936)"; | |
if (preg_match_all('#\([-,+][0-9\.]+, [-,+][0-9\.]+\)#', $pontos_str, $pontos) > 0) { | |
foreach ($pontos[0] as $ponto) { | |
$poligono[] = str_replace(' ', '', $ponto); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import random | |
from bs4 import BeautifulSoup | |
from time import sleep | |
def gera_digitos_verificadores(cpf_parcial): | |
"""Gera os dois últimos dígitos (verificadores) do CPF | |
Args: | |
cpf_parcial: contendo apenas os 9 primeiros dígitos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/q/37531811 | |
# Coments are in Portuguese, let me know if they are relevant – so I'll translate them promptly. | |
## File: proj/app/views.py (truncated) | |
from app import tasks | |
def indicar_cliente(request, cli_id): | |
tasks.indicar_cliente.delay(cli_id) | |
return HttpResponse(status=200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/default/celeryd | |
CELERYD_NODES="worker1" | |
CELERY_BIN="/usr/local/proj/venv/bin/celery" | |
CELERY_APP="app" | |
CELERYD_CHDIR="/usr/local/proj/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See docs.getsentry.com/on-premise/server/ for full | |
# instructions | |
version: '2' | |
services: | |
base: | |
build: . | |
environment: | |
# Run `docker-compose run web config generate-secret-key` | |
# to get the SENTRY_SECRET_KEY value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-09-06 14:56:55 [scrapy] INFO: Scrapy 1.1.2 started (bot: scrapybot) | |
2016-09-06 14:56:55 [scrapy] INFO: Overridden settings: {} | |
2016-09-06 14:56:55 [scrapy] INFO: Enabled extensions: | |
['scrapy.extensions.logstats.LogStats', | |
'scrapy.extensions.telnet.TelnetConsole', | |
'scrapy.extensions.corestats.CoreStats'] | |
2016-09-06 14:56:55 [scrapy] INFO: Enabled downloader middlewares: | |
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware', | |
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware', | |
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import requests | |
import re | |
CHROME_URL = 'https://chrome.google.com/webstore/detail/burlesco/lpamnanbhgpgkkpmilbifikmikfghlgh' | |
FIREFOX_URL = 'https://addons.mozilla.org/pt-BR/firefox/addon/burlesco/' | |
OPERA_URL = 'https://addons.opera.com/pt-br/extensions/details/burlesco/?display=pt' | |
def count_site(name, url, regex): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originalmente no Veduca, no momento não estão mais sendo "ofertados". Os vídeos estão não-listados no YouTube. | |
4Z1NUNgeF7M | |
gkG1zV8IWJc | |
86xcEGcx4q0 | |
i09GcdtfCsY | |
Urrf_J_hVco | |
6DVlzIY2XHA | |
G6jib5JL1r8 | |
BITD-jEX2eM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Estadão | |
http://.*\.?estadao\.com\.br/paywall | |
Folha | |
http://paywall\.folha\.uol\.com\.br/.* | |
O Globo | |
https?://ogjs\.infoglobo\.com\.br/.*/js/controla-acesso-aux\.js | |
https?://cdn\.tinypass\.com/api/tinypass\.min\.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ HAP-NodeJS git:(master) ✗ DEBUG=* node CameraCore.js | |
HAP-NodeJS starting... | |
EventedHTTPServer Server listening on port 51062 +0ms | |
EventedHTTPServer [::ffff:192.168.1.5] New connection from client +2s | |
EventedHTTPServer [::ffff:192.168.1.5] HTTP server listening on port 49469 +1ms | |
EventedHTTPServer [::ffff:192.168.1.5] HTTP request: /pair-verify +11ms | |
HAPServer [EC:22:3D:D3:CE:CE] HAP Request: POST /pair-verify +0ms | |
HAPServer [EC:22:3D:D3:CE:CE] Pair verify step 1/2 +3ms | |
EventedHTTPServer [::ffff:192.168.1.5] HTTP Response is finished +8ms | |
EventedHTTPServer [::ffff:192.168.1.5] HTTP request: /pair-verify +143ms |
OlderNewer