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
<article> | |
<h3>Bose QuietComfort 35 II</h3> | |
<p>$217.99</p> | |
<a href="...">See all options</a> | |
<img src="..." alt="..."> | |
</article> |
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
<article itemscope itemtype="https://schema.org/Product"> | |
<h3>Bose QuietComfort 35 II</h3> | |
<p>$217.99</p> | |
<a href="...">See all options</a> | |
<img src="..." alt="..."> | |
</article> |
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
// Before | |
<div class="card"> | |
<div class="message"> | |
<p class="warning-text">...</p> | |
</div> | |
</div> | |
// After | |
<div class="card"> | |
<p class="message warning-text">...</p> |
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
<style> | |
.card { | |
background-color: var(--card-color); | |
} | |
</style> | |
<ul> | |
<li class="card" style="--card-color: red;"></li> | |
<li class="card" style="--card-color: blue;"></li> | |
</ul> |
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
#include "MIDIUSB.h" | |
const int BUTTON_PIN = 2; | |
// Note "C2"! See https://github.com/arduino/tutorials/blob/master/ArduinoZeroMidi/PitchToNote.h | |
const int BUTTON_PITCH = 36; | |
void setup() { | |
pinMode(BUTTON_PIN, INPUT_PULLUP); | |
} |
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
const int BUTTON_PIN = 2; | |
// The setup function runs once when you press reset or power the board | |
void setup() { | |
// Initialize button pin as a pull-up input. | |
pinMode(BUTTON_PIN, INPUT_PULLUP); | |
// Initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); | |
} |
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
// The setup function runs once when you press reset or power the board | |
void setup() { | |
// Initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
// The loop function runs over and over again forever | |
void loop() { | |
// Turn the LED on (HIGH is the voltage level) | |
digitalWrite(LED_BUILTIN, HIGH); |
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
const int BUTTON_PIN = 2; | |
void setup() { | |
pinMode(BUTTON_PIN, INPUT); | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() { | |
int buttonState = digitalRead(BUTTON_PIN); | |
digitalWrite(LED_BUILTIN, buttonState); |
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 friendlyDate($s) { | |
$minutes = (time() - strtotime($s)) / 60; | |
if ($minutes < 1) return "Seconds ago"; | |
if ($minutes < 2) return "1 minute ago"; | |
if ($minutes < 60) return floor($minutes)." minutes ago"; | |
$hours = $minutes / 60; | |