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
[ | |
// missing accented characters fix for ubuntu 14.10 | |
// a, [á, à, ã, â, å, ä] | |
{ "keys": ["´","a"], "command": "insert", "args": {"characters": "á"}}, | |
{ "keys": ["`","a"], "command": "insert", "args": {"characters": "à"}}, | |
{ "keys": ["~","a"], "command": "insert", "args": {"characters": "ã"}}, | |
{ "keys": ["^","a"], "command": "insert", "args": {"characters": "â"}}, | |
{ "keys": ["°","a"], "command": "insert", "args": {"characters": "å"}}, | |
{ "keys": ["¨","a"], "command": "insert", "args": {"characters": "ä"}}, |
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 __future__ import unicode_literals | |
# Stdlib imports | |
import requests | |
import base64 | |
# Core Django imports | |
from django.shortcuts import render_to_response | |
from django.template import RequestContext | |
from django.views.generic import ( |
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 -*- | |
# Third | |
import iugu | |
# Apps | |
# apps | |
from apps.zipcodes.postmon import postmon_search_cep | |
from apps.zipcodes.zip_code import translate_to_iugu |
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
onSubmit={ async (values, actions) => { | |
let attemps = 1 | |
while ( attemps <= 2) { | |
try { | |
await SupplierService.create(values, token) | |
actions.setSubmitting(false); | |
// TODO: Fetch the paginated data | |
handleOpenSnackBar('Registro inserido com sucesso', 'success') | |
close(); |
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
Section "InputClass" | |
Identifier "evdev keyboard catchall" | |
MatchIsKeyboard "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "evdev" | |
Option "XkbLayout" "br" | |
Option "XkbVariant" "abnt2" | |
EndSection |
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 React from 'react' | |
class CtaImage extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { image: null } | |
} | |
componentDidMount() { | |
const { ctaImage } = this.props |
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 React from 'react'; | |
import { connect } from 'react-redux'; | |
import { | |
Container, Grid, Menu, | |
} from 'semantic-ui-react'; | |
import CustomerService from '../../services/CustomerService'; | |
import { customerListStart, customerListSuccess, customerListError } from './actions'; | |
import Create from './Create'; | |
import List from './List'; |
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 hashlib | |
import memcache | |
import traceback | |
from flask import request | |
from functools import wraps | |
from wakatime_website import app | |
from werkzeug.contrib.cache import MemcachedCache | |
mc = memcache.Client() | |
cache = MemcachedCache(mc) |
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
<!DOCTYPE html> | |
<html class="no-js" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}"> | |
<head> | |
{{ "<!-- Basic Page Needs -->" | safeHTML }} | |
{{ block "schema-dot-org" . }} | |
<!-- schema.org metadata differs for Nodes and Pages --> | |
{{ end }} |
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
def create_index(es_object, index_name="recipes"): | |
created = False | |
# index settings | |
settings = { | |
"settings": {"number_of_shards": 1, "number_of_replicas": 0}, | |
"mappings": { | |
"members": { | |
"dynamic": "strict", | |
"properties": { | |
"title": {"type": "text"}, |