Skip to content

Instantly share code, notes, and snippets.

View david-lafontant's full-sized avatar
🏠
Working from home

David Lafontant david-lafontant

🏠
Working from home
View GitHub Profile
@david-lafontant
david-lafontant / bending-shadow.css
Created April 22, 2024 20:54 — forked from nrrrdcore/bending-shadow.css
Simple Bended-Shadow CSS: Create the Bended Photo Effect without writing a million divs.
.bended-shadow {
position: relative;
width: 500px;
margin: 200px auto;
}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.
@david-lafontant
david-lafontant / contact-form-rails-6.md
Created August 1, 2022 21:27 — forked from stevecondylios/contact-form-rails-6.md
Create a Contact Form in Rails 6

How to make a contact form in rails 6

This is a quick walk through on how to:

  1. make a contact form in rails 6,
  2. test it locally, and
  3. move it into production using heroku and the MailGun addon

This uses the free heroku and mailgun plans. If you get stuck on any part, check the full code here.

@david-lafontant
david-lafontant / install-rbenv-win.bat
Created June 22, 2022 16:18 — forked from nak1114/install-rbenv-win.bat
Batch for install rbenv-win (require windows Vista+)
@echo off
setlocal
rem Set your rbenv directry
set instpath="%USERPROFILE%\.rbenv-win"
rem Clone git repositry
call git clone https://github.com/nak1114/rbenv-win.git %instpath%
rem Config path
@david-lafontant
david-lafontant / sort.rb
Created May 21, 2022 22:48 — forked from aspyct/sort.rb
Ruby implementation of quicksort, mergesort and binary search
# Sample implementation of quicksort and mergesort in ruby
# Both algorithm sort in O(n * lg(n)) time
# Quicksort works inplace, where mergesort works in a new array
def quicksort(array, from=0, to=nil)
if to == nil
# Sort the whole array, by default
to = array.count - 1
end
@david-lafontant
david-lafontant / example1.css
Last active January 31, 2022 23:56
DRY evaluation
.cat {
font-family: "Times New Roman", Times, serif;
font-size: 1rem;
color: #FFF;
}
.dog {
font-family: "Times New Roman", Times, serif;
font-size: 1rem;
color: #000;
@david-lafontant
david-lafontant / Plot_Examples.md
Created December 14, 2020 21:05 — forked from gizmaa/Plot_Examples.md
Various Julia plotting examples using PyPlot