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
{ | |
"results" : [ | |
{ | |
"address_components" : [ | |
{ | |
"long_name" : "01310-100", | |
"short_name" : "01310-100", | |
"types" : [ "postal_code" ] | |
}, | |
{ |
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
# coding: utf-8 | |
from django.test import TestCase | |
from breadcrumbs.breadcrumbs import Breadcrumbs | |
class BreadcrumbsTest(TestCase): | |
def setUp(self): | |
# instantiate the singleton |
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
""" Django unit tests to test singleton """ | |
from django.test import TestCase | |
class Singleton(object): | |
__instance__ = None | |
def __new__(cls, *a, **kw): |
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
# -*- coding: utf-8 -*- | |
# | |
# This code have contributions of Augusto Men (https://github.com/augustomen) | |
# and Nando Florestan (https://github.com/nandoflorestan) | |
# | |
from __future__ import (absolute_import, division, unicode_literals) | |
from datetime import date |
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 sys, logging | |
exc_info = sys.exc_info() | |
# this is important to get request info like url, browser, etc. | |
data = sentry_cli.get_data_from_request(request) | |
# and this to say what level of msg (error in case) and module of app current app | |
data.update({ | |
'level': logging.ERROR, | |
'logger': __name__, | |
}) | |
# than in extra you put all additional info u want. |
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/bin/perl | |
use RRDs; | |
use LWP::UserAgent; | |
# define location of rrdtool databases | |
my $rrd = '/opt/rrd'; | |
# define location of images | |
my $img = '/opt/rrd/html'; | |
# define your nginx stats URL |
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
# HTTPS server | |
server { | |
listen 443; | |
server_name localhost; | |
root /usr/share/nginx/www; | |
index index.html index.htm; | |
ssl on; | |
ssl_certificate /etc/nginx/server.crt; |
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
[user] | |
name = Felipe Prenholato | |
email = [email protected] | |
[core] | |
editor = vim | |
excludesfile = /home/felipe/.global_ignore | |
[alias] | |
st = status | |
co = checkout | |
br = branch |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+["], "command": "fold" }, | |
{ "keys": ["ctrl+]"], "command": "unfold" }, | |
{ "keys": ["super+f1"], "command": "py_help" } | |
] |
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
Jun 21 15:54:10 felipe-G51JX kernel: [21865.212277] usb 2-1.4: USB disconnect, device number 14 | |
Jun 21 15:54:12 felipe-G51JX kernel: [21867.971911] usb 2-1.4: new high-speed USB device number 15 using ehci_hcd | |
Jun 21 15:54:12 felipe-G51JX kernel: [21868.067397] scsi15 : usb-storage 2-1.4:1.0 | |
Jun 21 15:54:12 felipe-G51JX mtp-probe: checking bus 2, device 15: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4" | |
Jun 21 15:54:12 felipe-G51JX mtp-probe: bus: 2, device: 15 was not an MTP device | |
Jun 21 15:54:13 felipe-G51JX kernel: [21869.069274] scsi 15:0:0:0: Direct-Access Samsung File-CD Gadget 0000 PQ: 0 ANSI: 2 | |
Jun 21 15:54:13 felipe-G51JX kernel: [21869.070269] scsi 15:0:0:1: Direct-Access Samsung File-CD Gadget 0000 PQ: 0 ANSI: 2 | |
Jun 21 15:54:13 felipe-G51JX kernel: [21869.072789] sd 15:0:0:0: Attached scsi generic sg2 type 0 | |
Jun 21 15:54:13 felipe-G51JX kernel: [21869.073292] sd 15:0:0:1: Attached scsi generic sg3 type 0 | |
Jun 21 15:54:13 felipe-G51JX kernel: [21869.082133] sd 15:0:0:0: [sdb] At |