Skip to content

Instantly share code, notes, and snippets.

View SparrowMike's full-sized avatar
🎯
Focusing

SparrowMike

🎯
Focusing
View GitHub Profile
@joe-scotto
joe-scotto / Animation
Last active May 31, 2024 14:46
QMK OLED Displays
#ifdef OLED_ENABLE
// Rotate OLED
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_90;
}
// Animation parameters
#define FRAME_DURATION 333 // How long each frame lasts in milliseconds
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 29, 2024 13:54
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@adbutterfield
adbutterfield / prettier.config.js
Last active May 28, 2024 12:33
Default prettier config with comments and links to prettier rules
module.exports = {
/**
* Print Width
* https://prettier.io/docs/en/options.html#print-width
*
* Specify the line length that the printer will wrap on.
*
* printWidth: <int>
* default: 80
*/
@wojteklu
wojteklu / clean_code.md
Last active June 2, 2024 19:48
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@cirocosta
cirocosta / iframe.html
Last active January 6, 2024 23:02
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">