Skip to content

Instantly share code, notes, and snippets.

View celine-m-s's full-sized avatar

Céline MS celine-m-s

  • Paris
View GitHub Profile
@remarkablemark
remarkablemark / Dockerfile
Last active April 24, 2024 13:40
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@squirelo
squirelo / gist:5470ac512a2e333961c1
Created September 30, 2014 10:24
resize a background image
$(document).ready(function() {
$('.full-image').css({'height':(($(window).height()))+'px'});
$(window).resize(function(){
$('.full-image').css({'height':(($(window).height()))+'px'});
});
});
@pcreux
pcreux / pipable.rb
Last active June 12, 2018 17:08
*nix has pipes, Elixir has pipes, Ruby deserves pipes.
# Elixir has pipes `|>`. Let's try to implement those in Ruby.
#
# I want to write this:
#
# email.body | RemoveSignature | HighlightMentions | :html_safe
#
# instead of:
#
# HighlightMentions.call(RemoveSignature.call(email.body)).html_safe
#
@Papillard
Papillard / video-banner.html
Last active September 6, 2017 11:48
video-banner
<html>
<head>
<style>
body {
margin: 0px;
}
.header-video {
width: 100%;
height: 100vh;
@GRoguelon
GRoguelon / devise.fr.yml
Last active September 30, 2016 09:30
French translation of devise.en.yml (version: 3.2.4).
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
fr:
devise:
confirmations:
confirmed: 'Votre compte a été validé.'
send_instructions: 'Vous allez recevoir les instructions nécessaires à la confirmation de votre compte dans quelques minutes.'
send_paranoid_instructions: 'Si votre e-mail existe dans notre base de données, vous allez bientôt recevoir un e-mail contenant les instructions de confirmation de votre compte.'
failure:
already_authenticated: "Vous êtes déjà connecté"
@watson
watson / ability.rb
Created October 5, 2011 09:50
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
# app/models/ability.rb
# All front end users are authorized using this class
class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
can :read, :all