Skip to content

Instantly share code, notes, and snippets.

View guillaumecabanel's full-sized avatar
🦄

Guillaume CABANEL guillaumecabanel

🦄
View GitHub Profile
@guillaumecabanel
guillaumecabanel / confirmable_delete.js
Last active March 13, 2017 18:23
Use a confirmation delete for an object in rails
// JS
$('.delete-confirmable').click(function (e){
e.preventDefault();
$(this).hide();
$($(this).data('target')).removeClass('hidden');
})
@guillaumecabanel
guillaumecabanel / _footer.scss
Last active October 26, 2018 06:36
bottom-footer
@guillaumecabanel
guillaumecabanel / simple_form.rb
Created May 2, 2017 08:59
SimpleForm config for Semantic-UI
# config/initializers/simple_form.rb
# SimpleForm config for Semantic-UI
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
# complete input. You can remove any component from the
# wrapper, change the order or even add your own to the
# stack. The options given below are used to wrap the
# whole input.
@guillaumecabanel
guillaumecabanel / index.html
Created August 21, 2017 13:53
Sticky side map
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/css/materialize.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav>
@guillaumecabanel
guillaumecabanel / style.css
Created October 3, 2017 09:10
Contrasted image background
/*https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient*/
#banner{
background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url("http://lorempixel.com/1400/800/");
background-size: cover;
margin: 0;
height: 100vh;
}
@guillaumecabanel
guillaumecabanel / index.html
Created December 7, 2017 12:49
Custom color filter on embeded Youtube video
<div class="video-wrapper"></div>
<iframe class="my-video" src="https://www.youtube.com/embed/TLPvy5d3lo4?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" gesture="media" allow="encrypted-media"></iframe>
/ app/views/layouts/application.html.slim
doctype html
html
head
meta charset="UTF-8"
meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"
title title
= favicon_link_tag 'favicon.png'
= csrf_meta_tags
@guillaumecabanel
guillaumecabanel / liste complète.md
Last active August 22, 2018 20:00
Équipement alpinisme

Équipement alpinisme 🏔

La tête 🕶

  • Un bonnet, ou passe montagne
  • Une casquette
  • Une paire de lunettes de soleil haute protection
  • Crème de protection solaire pour le visage et les lèvres
  • Un masque de ski

Le buste 👕

@guillaumecabanel
guillaumecabanel / js_recap.md
Last active February 14, 2023 12:52
js recap

DOM & Events: recap

How to get one element from the dom

generic with css selector

<div class="title">Hello</div>