Skip to content

Instantly share code, notes, and snippets.

View tkovs's full-sized avatar
🤜
🤛

tkovs tkovs

🤜
🤛
View GitHub Profile
@tkovs
tkovs / short.c
Created February 27, 2015 00:04
Erro simples de C
#include <stdio.h>
int main()
{
short x, y;
x = 666;
y = 666;
printf ("%d %d\n", x, y);
@tkovs
tkovs / maximum.c
Last active August 29, 2015 14:17
#include <stdio.h>
#define SIZE 10
#define MAX(a,b) a > b ? a : b
int foo(int *x, int *y);
int bar(int *x, int size);
int main(void)
{
int x[SIZE] = {5, 7, 3, 1, 8, 5, 3, 2, 4, 5};
@tkovs
tkovs / date.c
Created March 25, 2015 04:00
Calcula idade e depois realiza um paranauê.
#include <stdio.h>
#include <time.h>
#include <windows.h>
int main(void)
{
SYSTEMTIME str_t;
// n = nascimento | a = atual
int nDia, nMes, nAno;
@tkovs
tkovs / DocLinks.md
Last active August 29, 2015 14:17 — forked from marcoonroad/DocLinks.md

#O que diabos é isso? Firefox OS

  • Open Source
  • Tecnologia Web
  • Hardware simples
  • Multiplataforma
  • Mercado emergente / Acessível

#Quão real isto é?

@tkovs
tkovs / Mortivacional.hs
Last active August 29, 2015 14:27 — forked from haskellcamargo/Mortivacional.hs
Mortivacional.hs
module Mortivacional where
import System.Console.ANSI
drawLine :: IO ()
drawLine = putStrLn $ replicate 23 '-'
turnRed :: IO ()
turnRed = setSGR [ SetConsoleIntensity BoldIntensity
, SetColor Foreground Vivid Red
]
@tkovs
tkovs / palindrome.hs
Created August 19, 2015 00:03
"Crie um programa que verifique se um número é palíndromo em binário!"
palindrome :: Eq a => [a] -> Bool
palindrome a = (equals a (reverse' a))
bin :: Int -> [Int]
bin 0 = []
bin x = bin (div x 2) ++ [mod x 2]
reverse' :: [a] -> [a]
reverse' [] = []
reverse' (x:xs) = reverse' xs ++ [x]
-`
.o+` tkovs@toby
`ooo/ OS: Arch Linux
`+oooo: Kernel: x86_64 Linux 4.1.6-1-ARCH
`+oooooo: Uptime: 4h 11m
-+oooooo+: Packages: 1180
`/:-:++oooo+: Shell: bash 4.3.39
`/++++/+++++++: Resolution: 1366x768
`/++++++++++++++: WM: OpenBox
`/+++ooooooooooooo/` WM Theme: Real-milk