Skip to content

Instantly share code, notes, and snippets.

View mtzfox's full-sized avatar

Mike Carlson mtzfox

View GitHub Profile
## Red May Schedule
@mtzfox
mtzfox / css-tabs-with-css-js-accordian.markdown
Created April 27, 2021 05:21
CSS Tabs with CSS/JS accordian
@mtzfox
mtzfox / css-tabs-with-css-js-accordian.markdown
Created April 27, 2021 05:45
CSS Tabs with CSS/JS accordian
@mtzfox
mtzfox / index.html
Created April 27, 2021 22:21
Pure HTML and CSS Accordion
<ul class="accordion">
<li class="accordion-item">
<input id="s1" class="hide" type="checkbox">
<label for="s1" class="accordion-button">
<span class="title">Real Abstraction: In the Mind but not from There</span>
<span class="date">Thu May 6th, 2021 @ 11am PDT</span>
</label>
<div class="accordion-content">
<p>
<span class="speakers">Speakers:</span>
@mtzfox
mtzfox / index.html
Created April 27, 2021 22:33
Pure HTML and CSS Accordion
<ul class="accordion">
<li class="accordion-item">
<input id="s1" class="hide" type="checkbox">
<label for="s1" class="accordion-button">
<span class="title">Real Abstraction: In the Mind but not from There</span>
<span class="date">Thu May 6th, 2021 @ 11am PDT</span>
</label>
<div class="accordion-content">
<p>
<span class="speakers">Speakers:</span>
@mtzfox
mtzfox / index.html
Created April 27, 2021 22:40
Pure HTML and CSS Accordion
<ul class="accordion">
<li class="accordion-item">
<input id="s1" class="hide" type="checkbox">
<label for="s1" class="accordion-button">
<span class="title">Real Abstraction: In the Mind but not from There</span>
<span class="date">Thu May 6th, 2021 @ 11am PDT</span>
</label>
<div class="accordion-content">
<p>
<span class="speakers">Speakers:</span>
@mtzfox
mtzfox / index.html
Created April 27, 2021 23:27
Pure HTML and CSS Accordion
<ul class="accordion">
<li class="accordion-item">
<input id="s1" class="hide" type="checkbox">
<label for="s1" class="accordion-button">
<span class="title">Real Abstraction: In the Mind but not from There</span>
<span class="date">Thu May 6th, 2021 @ 11am PDT</span>
</label>
<div class="accordion-content">
<p>
<span class="speakers">Speakers:</span>
@mtzfox
mtzfox / Reverse Words in a String.js
Created July 12, 2023 05:46
Runtime:45 ms, Beats: 99.44%
var reverseWords = function (s) {
let strArr = s
.replace(/\s{2,}/g, ' ')
.trim()
.split(' ')
.reverse();
return strArr.join(' ');
};
@mtzfox
mtzfox / reverse-vowels1.js
Last active July 12, 2023 05:56
Reverse vowels of a string
var reverseVowels = function (s) {
let vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'];
let strArr = [...s];
let foundVowels = [];
for (let i = s.length - 1; i >= 0; i--) {
if (vowels.includes(s[i])) {
foundVowels.push(s[i]);
}
}
for (let j = 0; j < strArr.length; j++) {
@mtzfox
mtzfox / greatestNumberOfCandy1.js
Last active July 12, 2023 06:09
Kids with greatest number of Candies
var kidsWithCandies = function(candies, extraCandies) {
let greatestNumber = candies.map(i => i).sort((a, b) => b - a)[0];
let output = [];
for (let i in candies) {
if (candies[i] + extraCandies >= greatestNumber) {
output.push(true);
}
else {