Skip to content

Instantly share code, notes, and snippets.

@Papillard
Papillard / nail.rb
Last active August 29, 2015 14:08
Fort Boyard nail's game @lewagon
def state_of_the_nail(length)
two_digit_length = (length * 100).truncate / 100.0
return "La longueur du clou est de #{two_digit_length} cms"
end
def hit_nail(length, force)
# Give nail length and player force in input, e.g 8, 3
# return new nail's length
return length - force * rand(0..1.0)
@Papillard
Papillard / contact.html
Created October 29, 2014 11:21
Kitty Blog - HTML/CSS example @lewagon
<!DOCTYPE html>
<html>
<head>
<title>KITTY BLOG | Home</title>
<meta charset="utf-8">
<meta name="description" content="KittyBlog, best cat blog in the world">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
@Papillard
Papillard / index.html
Created October 29, 2014 17:11
Fixed Navbar live-code @lewagon
<html>
<head>
<title>MON LAYOUT</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="navbar">
<div class="nav-content">
<h1>MY BLOG</h1>
@Papillard
Papillard / index.html
Created October 30, 2014 10:48
Bootstrap demo @lewagon
<!DOCTYPE html>
<html>
<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>--- TODO ---</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
@Papillard
Papillard / navbar_white.css
Last active August 29, 2015 14:08
White navbar over-ride for Bootstrap @lewagon
.navbar-white{
background: white;
border-bottom: 1px solid lightgrey;
}
.navbar-white .navbar-nav > li > a,
.navbar-white .navbar-nav > li > a:hover
{
color: black;
line-height: 50px;
@Papillard
Papillard / navbar_transparent.css
Created October 31, 2014 09:59
Transparent navbar for Bootstrap over-ride @lewagon
.navbar-transparent{
background: transparent;
border: none;
}
.navbar-transparent .navbar-nav > li > a,
.navbar-transparent .navbar-nav > li > a:hover
{
color: white;
line-height: 50px;
@Papillard
Papillard / game.js
Created November 5, 2014 10:11
Wagon-Race game
$(document).ready(function(){
//On crée la piste de course
var trackSize = 20;
generateTrack(trackSize);
//On lance le jeu
runGame();
});
@Papillard
Papillard / bootstrap.sublime-snippet
Created November 6, 2014 08:15
Bootstrap Snippet for Sublime Text
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<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>--- TODO ---</title>
@Papillard
Papillard / Gemfile
Last active September 20, 2022 20:12
Longest-Word Rails livecode @lewagon
# Very precious debug gems :)
gem 'binding_of_caller', group: :development
gem 'better_errors', group: :development
@Papillard
Papillard / snazzy-maps.html
Created November 14, 2014 09:28
Snazzy Maps integration @lewagon
<div id="map" style="width: 100%; height: 400px;"></div>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
<script type="text/javascript">
var myLatlng = new google.maps.LatLng(48.852937,2.364178);
var myOptions = {
zoom: 14,
center: myLatlng,