Skip to content

Instantly share code, notes, and snippets.

View Camvillard's full-sized avatar

camille villard Camvillard

View GitHub Profile
@Camvillard
Camvillard / calculateGPA.Ts
Last active September 19, 2022 13:40
rdv with cassidoo - Interview question of the week (2022-09-19)
enum Grade {
A = 4,
"A-" = 3.7,
"B+" = 3.3,
B = 3,
"B-" = 2.7,
"C+" = 2.3,
C = 2,
"C-" = 1.7,
"D+" = 1.3,
@Camvillard
Camvillard / landing-page-workshop.md
Last active October 1, 2019 21:09
Le Wagon workshop - Intro to HTML & CSS

Le Wagon workshop - Intro to HTML & CSS

What you will build in this workshop: your responsive landing page

1. LET'S SET UP

  1. Start Sublime Text. It will open a new black window.
  2. Create a folder landing on your Desktop. Drag & drop this folder in the Sublime Text window.
  3. In Sublime Text left navigation:
  • Right click "New file"
@Camvillard
Camvillard / design-resources.md
Last active October 14, 2023 23:39
design resources

design resources

fonts & typography

remember : don't use more than 2 or 3 fonts (well, if you're a designer, you'll know what to do with more fonts), and never, please, never include Comic Sans MS in those 3 fonts.

  • google fonts : free & ready to use on the web
  • adobe fonts : not free, but a ton of stuff, if you're willing to dive into design, may be worth it
  • font awesome : icons as fonts
  • typography cheatsheet : this is just because I can't help myself but put some typography knowledge in all the resources I give.
  • font pair : helps you pairing fonts together
  • typo samples : samples of fonts in action together

basic front end resources

fonts

remember : don't use more than 2 or 3 fonts (well, if you're a designer, you'll know what to do with more fonts), and never, please, never include Comic Sans MS in those 3 fonts.

@Camvillard
Camvillard / comments.php
Last active April 28, 2019 20:39
linking author url in comments (gist for 'un invincible ete' blog)
<?php
/**
* The template to display the Comments.
*
* The area of the page that contains both current comments
* and the comment form.
*/
/*
* If the current post is protected by a password and
@Camvillard
Camvillard / contact.rb
Created March 15, 2019 00:17
setup a contact form in rails
# use contact template from cdlt bisou
# setup default from address
# add a contact method in MessageMailer
def contact(message)
@message = message
mail(to: 'mail',
from: 'mail',
subject: @message.subject
)
@Camvillard
Camvillard / scrape.rb
Last active April 28, 2019 20:38
Scrape HTML . using open-uri & nokogiri gems
url = "http://www.letscookfrench.com/recipes/find-recipe.aspx?s=chocolate"
html_file = open(url).read
html_doc = Nokogiri.HTML(html_file)
html_doc.search('.m_titre_resultat a').each do |element|
puts element.text.strip
puts element.attribute('href').value
end