Skip to content

Instantly share code, notes, and snippets.

View boniattirodrigo's full-sized avatar

Rodrigo Boniatti boniattirodrigo

View GitHub Profile
@boniattirodrigo
boniattirodrigo / MyComponent.js
Created February 15, 2017 01:03
First React Native Component
import React, { Component } from 'react';
import {
AppRegistry,
Text,
View
} from 'react-native';
class MyComponent extends Component {
render() {
return (
@boniattirodrigo
boniattirodrigo / react-native-structure.txt
Created February 13, 2017 01:09
React Native Structure
__tests__
android
index.android.js
index.ios.js
ios
node_modules
package.json
yarn.lock
@boniattirodrigo
boniattirodrigo / run-react-native-project.sh
Created February 13, 2017 01:06
Run React Native Project
# For iOS
react-native run-ios
# For Android
react-native run-android
@boniattirodrigo
boniattirodrigo / start-project.sh
Created February 13, 2017 01:03
Start React Native Project
react-native init MyProject
@boniattirodrigo
boniattirodrigo / js-highlight-command.sh
Last active February 10, 2017 00:44
JS highlight command
highlight -O rtf myClass.js --font-size 24 --font Inconsolata --style moria -W -J 50 -j 3 --src-lang js | pbcopy
@boniattirodrigo
boniattirodrigo / README.md
Created October 14, 2016 16:31 — forked from BastinRobin/README.md
Django URL regex

Common Regular Expressions for Django URLs

A list of comman regular expressions for use in django url's regex.

Example Django URLs patterns:

urlpatterns = patterns('',
@boniattirodrigo
boniattirodrigo / gunicorn_start.bash
Created May 8, 2016 20:55 — forked from postrational/gunicorn_start.bash
Example of how to set up Django on Nginx with Gunicorn and supervisordhttp://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name
@boniattirodrigo
boniattirodrigo / removerAcentosECaracteresEspeciais.py
Last active December 28, 2023 18:38
Remover acentos e caracteres especiais em Python
import unicodedata
import re
"""
A remoção de acentos foi baseada em uma resposta no Stack Overflow.
http://stackoverflow.com/a/517974/3464573
"""
def removerAcentosECaracteresEspeciais(palavra):
@boniattirodrigo
boniattirodrigo / barcode_i2of5_sample.py
Created November 27, 2015 16:19 — forked from mmmattos/barcode_i2of5_sample.py
Creating Barcodes for Brazilian Banking using Python and Reportlab
# Sample i2of5 barcode generation.
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib.units import mm
from reportlab.graphics.barcode.common import I2of5
c=canvas.Canvas("barcode_example.pdf",pagesize=A4)
tb=0.254320987654 * mm # thin bar
bh=20 * mm # bar height
$('.table').on('click', '.table__delete', function() {
if ($(this).parent().is(':not(:last-child)')) {
var linhaClicada = $(this).parent().index();
console.log(linhaClicada);
$.ajax({
type: 'POST',
dataType: 'json',
url: "/atendimento/deletar-servico-ou-item-selecionado/",
data: {
item: linhaClicada,