Skip to content

Instantly share code, notes, and snippets.

@giannispan
giannispan / css
Created July 14, 2016 05:20
Simple Quote Machine
.form-control {
height: 50px;
}
@giannispan
giannispan / css
Created July 14, 2016 05:18
wikipedia viewer
body {
background-color: #999;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.btn {
margin-top:5px;
}
@giannispan
giannispan / css
Created July 14, 2016 05:15
tic tac toe
.Square {
width: 100px;
height: 100px;
text-align: center;
font-size: 42pt;
font-family: Verdana;
}
@giannispan
giannispan / index.html
Created February 15, 2016 17:26 — forked from anonymous/index.html
tribute page
<section id="about" class="side-image about-section"><!-- About -->
<div class="image-container col-lg-6 col-md-5 col-sm-3 pull-left">
<div class="about-bg-image-holder">
</div>
</div>
<div class="container">
<div class="row animate-in" data-anim-type="bounce-in-up" data-anim-delay="400">
@giannispan
giannispan / index.html
Created February 15, 2016 17:24 — forked from anonymous/index.html
weather report
<body>
<div class="container">
<div>
<h1>Local Weather Report</h1>
</div>
<div class="container-fluid">
<div class="info">
<div class="col-sm-10 ">
<div id="locationContainer"></div>
@giannispan
giannispan / index.html
Created February 11, 2016 12:15 — forked from anonymous/index.html
quote machine
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Get your daily quote!</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
@giannispan
giannispan / Tic-Tac-Toe Checker
Created February 2, 2016 21:03
We want our function to return -1 if the board is not solved yet, 1 if X won, 2 if O won, or 0 if it's a cat's game (i.e. a draw). You may assume that the board passed in is valid in the context of a game of Tic-Tac-Toe.
function isSolved(board) {
if ((board[0][0] == 1 && board[0][0] == board[1][1] &&
board[1][1] == board[2][2]) || (board[0][2] == 1 && board[0][2] == board[1][1] &&
board[1][1] == board[2][0])) return 1;
else if ((board[0][0] == 2 && board[0][0] == board[1][1] &&
board[1][1] == board[2][2]) || (board[0][2] == 2 && board[0][2] == board[1][1] &&
board[1][1] == board[2][0])) return 2;
for (var i =0; i<3; i++)
@giannispan
giannispan / Perfect power
Created February 2, 2016 09:01
Your task is to check wheter a given integer is a perfect power. If it is a perfect power, return a pair m and k with mk = n as a proof. Otherwise return Nothing, Nil, null, None or your language's equivalent.
var isPP = function(n){
var result=[];
for (var m=2; m<=Math.sqrt(n); m++)
{
var k = 2;
var p = Math.pow(m, k);
while (p<=n && p>0)
{
if (p==n)