Snippets Collections
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8" crossorigin="anonymous"></script>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous">
.gradient {
  background-image:
    radial-gradient(
      yellow,
      #f06d06
    );
}
/* Linear gradient pattern */

.repeat {
  background-image: 
    repeating-linear-gradient(
      45deg,
      yellow,
      yellow 10px,
      red 10px,
      red 20px /* determines size */
    );
}

/* Radial gradient pattern */

.repeat {
  background: 
    repeating-radial-gradient(
      circle at 0 0, 
      #eee,
      #ccc 50px
    );
}
<img 
	src="example.com/cat.png" 
    alt="Photo of a cat" 
    height="50" 
    width="100"
    longdesc="#catDetails"
 >
const arrAvg = arr => arr.reduce((a,b) => a + b, 0) / arr.length
// arrAvg([20, 10, 5, 10]) -> 11.25
const arrSum = arr => arr.reduce((a,b) => a + b, 0)
// arrSum([20, 10, 5, 10]) -> 45
const arrMax = arr => Math.max(...arr);
// arrMax([20, 10, 5, 10]) -> 20
const arrMin = arr => Math.min(...arr);
// arrMin([20, 10, 5, 10]) -> 5

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('m/d/Y');
# get "/articles?page=2"
request.original_url # => "http://www.example.com/articles?page=2"
star

Mon May 10 2021 12:31:48 GMT+0000 (UTC) https://getbootstrap.com/

#bootstrap #css #html #webdev
star

Fri Jan 10 2020 19:00:00 GMT+0000 (UTC) https://css-tricks.com/snippets/css/css-radial-gradient/

#css #design #gradient #webdev
star

Wed Jan 08 2020 19:00:00 GMT+0000 (UTC) https://css-tricks.com/snippets/css/css-repeating-gradients/

#css #webdev #design #gradients
star

Sun Jan 05 2020 19:39:47 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math
star

Sun Jan 05 2020 19:37:35 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math
star

Sun Jan 05 2020 19:35:54 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #javascript #arrays #math
star

Sun Jan 05 2020 19:31:48 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math
star

Sun Jan 05 2020 18:59:56 GMT+0000 (UTC) https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

#css #webdev #text
star

Sat Jan 04 2020 18:42:11 GMT+0000 (UTC) https://stackoverflow.com/questions/2167916/convert-one-date-format-into-another-in-php

#php #webdev #howto
star

Tue Dec 31 2019 19:00:00 GMT+0000 (UTC) https://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-original_url

#howto #rubyonrails #webdev #interviewquestions

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension