Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bizz84
bizz84 / flutter_bootstrap.js
Created May 21, 2024 08:40
Custom Flutter Web App Initialization Logic with CSS Loader
{{flutter_js}}
{{flutter_build_config}}
// Manipulate the DOM to add a loading spinner will be rendered with this HTML:
// <div class="loading">
// <div class="loader" />
// </div>
const loadingDiv = document.createElement('div');
loadingDiv.className = "loading";
document.body.appendChild(loadingDiv);
@anschaef
anschaef / bootstrap-5-sass-mixins-cheat-sheet.scss
Last active May 21, 2024 13:06
All New Bootstrap 5 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 5 Sass Mixins [ Cheat sheet ]
// Updated to Bootstrap v5.1.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/main/scss/mixins
// @see https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss
/* -------------------------------------------------------------------------- */
// Options
// @see https://getbootstrap.com/docs/5.1/customize/options/
From: http://www.labnol.org/software/wget-command-examples/28750/
How do I download an entire website for offline viewing? How do I save all the MP3s from a website to a folder on my computer? How do I download files that are behind a login page? How do I build a mini-version of Google?
Wget is a free utility – available for Mac, Windows and Linux (included) – that can help you accomplish all this and more. What makes it different from most download managers is that wget can follow the HTML links on a web page and recursively download the files. It is the same tool that a soldier had used to download thousands of secret documents from the US army’s Intranet that were later published on the Wikileaks website.
You mirror an entire website with wget
Mirror an entire website with wget
Spider Websites with Wget – 20 Practical Examples
@SteveJonesDev
SteveJonesDev / accessible-menu.php
Last active May 21, 2024 13:05
Accessible WordPress Navigation Menu
<div class="menu-container">
<button class="menu-button" aria-expanded="false" aria-controls="site-header-menu" aria-label="<?php esc_attr_e( 'Menu', 'textdomain' ); ?>"></button>
<div id="site-header-menu" class="site-header-menu">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'main-navigation',
'container_id' => 'site-navigation',
@karlhorky
karlhorky / migrate-to-eslint-plugin-import-x.diff
Last active May 21, 2024 13:05
Migrate from eslint-plugin-import to eslint-plugin-import-x
// Migrate from eslint-plugin-import (no ESLint v9 support, multiple issues and missing features)
// to eslint-plugin-import-x
//
// - https://www.npmjs.com/package/eslint-plugin-import
// - https://www.npmjs.com/package/eslint-plugin-import-x
// First, install `eslint-plugin-import-x` (and for TypeScript support, `@typescript-eslint/parser`)
-import eslintImport from 'eslint-plugin-import';
+import eslintImportX from 'eslint-plugin-import-x';
@ArnoutDevos
ArnoutDevos / Remove_notebook_checkpoints.sh
Created December 7, 2018 10:08
command to remove automatically created .ipynb_checkpoints folders and their checkpoints
rm -rf `find -type d -name .ipynb_checkpoints`
@w3core
w3core / brightnessByColor.js
Created December 8, 2016 08:52
Calculate brightness value by RGB or HEX color
/**
* Calculate brightness value by RGB or HEX color.
* @param color (String) The color value in RGB or HEX (for example: #000000 || #000 || rgb(0,0,0) || rgba(0,0,0,0))
* @returns (Number) The brightness value (dark) 0 ... 255 (light)
*/
function brightnessByColor (color) {
var color = "" + color, isHEX = color.indexOf("#") == 0, isRGB = color.indexOf("rgb") == 0;
if (isHEX) {
var m = color.substr(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g);
if (m) var r = parseInt(m[0], 16), g = parseInt(m[1], 16), b = parseInt(m[2], 16);
@mildsunrise
mildsunrise / README.md
Last active May 21, 2024 13:02
Documentation of Tuya's weird compression scheme for IR codes

[Tuya][]'s IR blasters, like the [ZS08][], have the ability to both learn and blast generic IR codes. These IR codes are given to the user as an opaque string, like this:

A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ==

Not much is known about the format of these IR code strings, which makes it difficult to use codes obtained through other means (such as a

Pipeline still running ...
PipelineRun is still running: Tasks Completed: 29 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 22
[get-pr-number : parse-pr-url] + echo -n 245
[get-pr-number : parse-pr-url] + tee /tekton/results/git_pr_number
[get-pr-number : parse-pr-url] 245
[acquire-lease : create-lease] + calculate_duration_in_seconds 90m
[acquire-lease : create-lease] + '[' m == m ']'
[acquire-lease : create-lease] + TOTAL_DURATION_IN_SECONDS=5400
[acquire-lease : create-lease] + export TOTAL_DURATION_IN_SECONDS