This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.navigation { | |
// ... | |
&__hamburger { | |
margin-top: 2rem; | |
position: relative; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li>sassy</li> | |
<li>sassy</li> | |
<li>boi</li> | |
</ul> | |
<style> | |
ul { list-style:none; } | |
li::before { content: "💅 "; } | |
li::after { content: "✨"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.navigation { | |
&__cbox { display: none; } | |
&__hamburger-box { | |
width: 4rem; | |
height: 4rem; | |
position: absolute; | |
top: 3rem; | |
left: 3rem; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="navigation"> | |
<input class="navigation__cbox" id="DrawerToggle" type="checkbox"/> | |
<label class="navigation__hamburger-box" for="DrawerToggle"> | |
<span class="navigation__hamburger"> </span> | |
</label> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="navigation"> | |
<input class="navigation__cbox" id="DrawerToggle" type="checkbox"/> | |
<label class="navigation__hamburger-box" for="DrawerToggle"> | |
</label> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function draw () { | |
let WIDTH = visualizer.width | |
let HEIGHT = visualizer.height | |
// loop this | |
window.requestAnimationFrame(draw) | |
// get the current Data (gets placed into array arg) | |
player.getAnalyzerTimeBytes(1, f1visualData) | |
player.getAnalyzerTimeBytes(2, f2visualData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="svg-wrapper"> | |
<svg | |
class="svg-paper" | |
id="paper" | |
preserveAspectRatio="xMidYMid meet" | |
viewbox="0 0 400 400" | |
width="100%" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:svg="http://www.w3.org/2000/svg"> | |
<g class="svg-paper__group"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catch (err) { | |
// never forget to rollback | |
await transaction.rollback() | |
if (err instanceof TypeError) { | |
// we know now that we couldn't find a team | |
return res.status(404).send('useful message regarding team not found') | |
} | |
else if (err.message === 'tag not found') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let transaction | |
let teamToUpdate | |
try { | |
transaction = await sequelize.transaction() // Managed Transaction | |
// update the team | |
teamToUpdate = await Team.findOne({ where: {...}, transaction }) | |
/* POTENTIAL ERROR - .update of null */ | |
await teamToUpdate.update({...}, {transaction}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let transaction | |
try { | |
// Unmanaged Transaction | |
transaction = await sequelize.transaction() | |
// make sure to use the transaction in options | |
await Team.create({...},{transaction}) | |
// always call commit at the end | |
await transaction.commit() |