Skip to content

Instantly share code, notes, and snippets.

View LeanSeverino1022's full-sized avatar

Leandro Severino LeanSeverino1022

View GitHub Profile
@LeanSeverino1022
LeanSeverino1022 / webdev_online_resources.md
Last active June 8, 2020 14:44 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading) #resources
@LeanSeverino1022
LeanSeverino1022 / .leptonrc
Last active October 25, 2022 23:03
[Set lepton theme to dark] This is a template for Lepton's configuration file. Please place it on your home directory #config
{
"theme": "dark",
"snippet": {
"expanded": true,
"newSnippetPrivate": false,
"sorting": "updated_at",
"sortingReverse": true
},
"editor" : {
"tabSize": 4
@LeanSeverino1022
LeanSeverino1022 / markdown-cheatsheet.md
Last active January 6, 2026 02:24
markdown cheatsheet #markdown #cheatsheet
@LeanSeverino1022
LeanSeverino1022 / image-grid.md
Last active September 2, 2019 05:11 — forked from trusktr/image-grid.md
Image grid in Markdown @markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@LeanSeverino1022
LeanSeverino1022 / findSmallestNum.js
Created September 2, 2019 07:12
find smallest number #vanillajs
//Returns the minimum value in a given array.
const arrMin = arr => Math.min(...arr);
// arrMin([20, 10, 5, 10]) -> 5
//how it works / src: https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332
@LeanSeverino1022
LeanSeverino1022 / getAverage.js
Created September 2, 2019 07:20
get average value
//Returns the average of all values in any non-empty array.
//note that the '0' is an optionally supplied initial value. If this value is not supplied, the 0th element is used as the initial value.
const arrAvg = arr => arr.reduce((a,b) => a + b, 0) / arr.length
// arrAvg([20, 10, 5, 10]) -> 11.25
/*
notes: Finding the average value of a group of numbers is as easy as summing all of the numbers and dividing by the total number of numbers.
In this function, we first use reduce() to reduce all values in our array to a single sum. Once we have the sum we simply divide this value by the length of the array. The result is the average value which then gets returned.
@LeanSeverino1022
LeanSeverino1022 / test.md
Last active September 5, 2019 10:16
[dev mindset] #dump

learnings:

"You don't need to reinvent the wheel" is fine if:

  • you know how a wheel works
  • you know how this wheel works
  • this wheel doesn't come with a whole bunch of crap you'll never use
  • you only want a wheel
@LeanSeverino1022
LeanSeverino1022 / cheatsheet.md
Last active September 12, 2019 03:35
HTML STUFF #dump #HTML #cheatsheet

HTML Tags Cheatsheet from w3 schools link

@LeanSeverino1022
LeanSeverino1022 / app.js
Created September 6, 2019 03:02
very basics of vue
new Vue({
el: '#app',
data: {
title: 'Go to Facebook',
link: 'http://fb.com',
sampleHtml: '<h2>Sample HTML </h2>'
},
methods: {
changeTitle: function(evt){
this.title = evt.target.value;
@LeanSeverino1022
LeanSeverino1022 / random.js
Last active September 6, 2019 03:31
Basic random number #vanillajs
//Math.random() returns a floating point number from 0 up to but not including 1. For example:
/*
> Math.random()
0.2625259844878184
> Math.random()
0.06513541210374607
> Math.random()
0.5629554153276711
*/