Skip to content

Instantly share code, notes, and snippets.

Avatar

LuanComputacao LuanComputacao

View GitHub Profile
View main.py
import turtle
turtle.speed(10)
turtle.bgcolor('black')
turtle.pensize(3)
def func():
for _ in range(200):
turtle.right(1)
@LuanComputacao
LuanComputacao / generate_responsive.css
Last active Jan 27, 2022
Generate responsive CSS property from a list of SCSS key-values
View generate_responsive.css
@media (min-width: 1400px) {
.button-accordion {
height: 82%; } }
@media (min-width: 768px) {
.button-accordion {
height: 74%; } }
@media (min-width: 1400px) {
.button-accordion--right {
@LuanComputacao
LuanComputacao / docker-compose.yml
Created Aug 8, 2020
Docker compose para MongoDB com armazenamento local
View docker-compose.yml
version: '3'
services:
databse:
image: 'mongo'
container_name: 'mongo-dota'
environment:
- MONGO_INITDB_DATABASE=dota
- MONGO_INITDB_ROOT_USERNAME=teomewhy
- MONGO_INITDB_ROOT_PASSWORD=123
View banchmark__bigger_word_finder__for_or_loop.js
let times = 600000
let frase = "The quick red fox jumped over the lazy dog and ran away quickly";
function biggestWord(frase){
let biggest = '';
let words = frase.split(' ');
for(let i=0; i < words.length; i++){
if(words[i].length > biggest.length){
biggest = words[i];
}
View exemplo_de_troca_de_posicoes_em_c.c
// 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];
@LuanComputacao
LuanComputacao / qualidade_de_codigo_usuarios_case.sh
Created Feb 13, 2020
Qualidade de Código: usuarios_case.sh
View qualidade_de_codigo_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
@LuanComputacao
LuanComputacao / maven.Dockerfile
Last active Jun 9, 2022
Dockerfile to install maven
View maven.Dockerfile
#
# 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 / fix_cedilla.sh
Created Jul 24, 2019
Fix the cedilla issue in Ubuntu
View fix_cedilla.sh
#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 / README-Template.md
Created Jul 2, 2019 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.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

View vim_cheatsheet.md

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