Skip to content

Instantly share code, notes, and snippets.

View LuanComputacao's full-sized avatar
🏠
Working from home

LuanComputacao LuanComputacao

🏠
Working from home
View GitHub Profile
@LuanComputacao
LuanComputacao / Atom python
Last active March 7, 2017 14:05
Configurations to code in django framework
# To work with python
pip install --upgrade autopep8
pip install flake8
pip install flake8-docstrings
pip install iresolve
# To work with python and django
apm install python-tools
for PYFILE in $(find . -name '*.py'); do pep8 $PYFILE --count >> pep8.log; done
class DotExpandedDict(dict):
"""
- A special dictionary constructor that takes a dictionary in which the
- keys may contain dots to specify inner dictionaries. It's
- confusing, but this
- example should make sense.
-
- >>> d = DotExpandedDict({'person.1.firstname': ['Simon'], \
- 'person.1.lastname': ['Willison'], \
- 'person.2.firstname': ['Adrian'], \
@LuanComputacao
LuanComputacao / pegar_pontos_cartesianos.py
Created April 12, 2018 14:45
Captura uma string e retorna o dicionario de coordenadas
# coding=utf-8
def pegar_pontos_cartesianos(pontos_str):
"""Captura uma string e retorna o dicionario de coordenadas
Ex:
In :: pontos = pegar_pontos_cartesianos('P(0,2,3);Y(0.6,3.5,3.9);J(2,5,103)')
In :: print(pontos)
Out:: {'Y': [0.6, 3.5, 3.9], 'P': [0.0, 2.0, 3.0], 'J': [2.0, 5.0, 103.0]}
:param pontos_str: Representação de pontos cartesianos

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@LuanComputacao
LuanComputacao / README-Template.md
Created July 2, 2019 22:46 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@LuanComputacao
LuanComputacao / fix_cedilla.sh
Created July 24, 2019 02:17
Fix the cedilla issue in Ubuntu
#Aplicações: QT (e KDE)
cd /usr/share/X11/locale/en_US.UTF-8
cp Compose Compose.original
cat Compose.original | sed -e 's/Ć/ć/' -e 's/Ç/ç/' > Compose
exit
#Aplicações: GTK (e Gnome)
cd /usr/lib/gtk-2.0/2.10.0/immodule-files.d/
cat libgtk2.0-0.immodules | sed -e 'az:ca:co:fr:gv:oc:pt:sq:tr:wa' -e 'en:az:ca:co:fr:gv:oc:pt:sq:tr:wa'
touch /etc/environment
@LuanComputacao
LuanComputacao / maven.Dockerfile
Last active October 30, 2023 10:47
Dockerfile to install maven
#
# Oracle Java 7 Dockerfile
#
# https://github.com/dockerfile/java
# https://github.com/dockerfile/java/tree/master/oracle-java7
#
# Pull base image.
FROM alpine as build
@LuanComputacao
LuanComputacao / qualidade_de_codigo_usuarios_case.sh
Created February 13, 2020 15:38
Qualidade de Código: usuarios_case.sh
#!/bin/bash
#-------------------------------------------------------------------------------
# usuarios.sh
#-------------------------------------------------------------------------------
#
# Mostra os logins e nomes de usuários do sistema
# Obs: Lê dados do arquivo /etc/passwd
#
# Luan Roger, Março de 2016
// To execute
// gcc exemplo_de_troca_de_posicoes_em_c.c -o programinha && ./programinha
//
#include <stdio.h>
void trocaValor(int *vetorzinho, int primeiro, int segundo) // Definição da função "EsperaEnter"
{
int temporario = vetorzinho[primeiro];
vetorzinho[primeiro] = vetorzinho[segundo];