Skip to content

Instantly share code, notes, and snippets.

View tkovs's full-sized avatar
🤜
🤛

tkovs tkovs

🤜
🤛
View GitHub Profile
@tkovs
tkovs / total a pagar.sql
Last active November 18, 2015 00:47
[RESOLVIDO] Dúvida sobre QUERY
Tenho as seguintes tabelas:
SELECT * FROM cliente;
id nome celular
---------- ---------- ----------
1 Joao 981******
2 Nivaldo 981******
3 Layse 981******
4 Raimundo 981******
@tkovs
tkovs / livraria.sql
Last active December 21, 2015 09:08
Banco de dados para projeto de POO
CREATE TABLE cliente (
cpf VARCHAR(11) PRIMARY KEY,
nome VARCHAR(35),
telefone VARCHAR(20),
cidade VARCHAR(20)
);
CREATE TABLE fornecedor (
cnpj VARCHAR(18) PRIMARY KEY,
nome VARCHAR(35),
@tkovs
tkovs / Archlinux pós-instalação.sh
Last active April 11, 2016 00:12
Minhas configurações do archlinux que vou tentar na próxima instalação.
openbox - feh - tint2 - slim (TALVEZ) - thunar
http://www.vivaolinux.com.br/artigo/Instalacao-e-configuracao-do-Openbox-personalizado-usando-Arch-Linux
mpd + ncmpcpp
http://www.linuxandlife.com/2012/01/simple-guide-to-set-up-mpd-with-ncmpcpp.html
Sobre a seguinte mensagem: listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
http://crunchbang.org/forums/viewtopic.php?pid=182574
conky
$yaourt conky-lua-arch
@tkovs
tkovs / colortrans.py
Created August 2, 2016 18:32 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@tkovs
tkovs / database.cs
Last active March 26, 2017 20:31
Slat's database
using Unity.Engine;
using System.Collections;
public class SlatDatabase : MonoBehaviour
{
private void Start()
{
if (!PlayerPrefs.HasKey("progress"))
{
this.initialize();
import scrapy
class ranking(scrapy.Spider):
name = 'ranking'
allowed_domains = ['yugiohrpgonline.com.br']
start_urls = ['https://www.yugiohrpgonline.com.br/clan/SET/ranking/week/']
def parse(self, response):
formdata = {
'login': 'user',
# name: items.py
import scrapy
class Quote(scrapy.Item):
author = scrapy.Field()
# name: quotes.py
# -*- coding: utf-8 -*-
@tkovs
tkovs / Tkovs.java
Last active July 18, 2017 11:25
oi
package Puck;
import robocode.*;
//import java.awt.Color;
public class Tkovs extends AdvancedRobot
{
public int strategia;
public double life;
public void run() {
@tkovs
tkovs / search_field.sql
Created October 19, 2017 12:26
Search a FIELD in a database
SELECT f.rdb$relation_name, f.rdb$field_name
FROM rdb$relation_fields f
JOIN rdb$relations r ON f.rdb$relation_name = r.rdb$relation_name
AND r.rdb$view_blr IS null
WHERE f.rdb$field_name LIKE '%FIELD%'
ORDER BY 1, f.rdb$field_position;
@tkovs
tkovs / aula1.py
Created October 24, 2017 19:32
Algoritmos da aula de python
# Faça um programa que receba um valor em dolar e retorne seu valor em reais
# A cotação do dolar é de 3.22
def conversao(valor_em_dolar):
cotacao = 3.22
valor_em_real = valor_em_dolar * cotacao
return valor_em_real
# Faça um programa que receba um valor em Celsius e retorne sua conversão para Farenheit