/* https://codepen.io/kevinpowell/full/vYvEdWG */
.cluster {
outline: 5px solid hotpink;
padding: 1rem;
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.flexible-grid {
outline: 5px solid hotpink;
padding: 1rem;
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.flexible-grid > * {
flex: 1;
}
.auto-grid {
outline: 5px solid hotpink;
padding: 1rem;
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}
.reel {
outline
rechargepartners.slack.com
shopifypartners.slack.com
pip freeze > requirements.txt && pip uninstall -r requirements.txt -y
<?php
/*
* Plugin name: Sevanova User
* Description: See title
* Author: Sevanova
* Author URI: https://www.sevanova.com
* Version: 1.0.0
* Text Domain: sn-user
*/
class Sevanova_User {
// Construct
public function __construct() {
add_action( 'manage_users_extra_tablenav', array( $this, 'sn_manage_filter_by' ), 20, 1 );
add_action( 'pre_get_users', array( $this, 'sn_filter_query_by' ) );
add_filter( 'manage_users_custom_column', array( $this, 'sn_content_custom_col
# countVowels(string):int
# countConsonants(string):int
# countCharacters(string word, string char):int
# isAnagram(string, string):boolean
# isPalindrome(string):boolean
# pyramid(int)
def countVowels(s):
vowels = ['a', 'e', 'i', 'o', 'u']
count = 0
for char in s:
if char in vowels:
count += 1
return count
def countConsonants(s):
vowels = ['a', 'e', 'i', 'o', 'u']
count = 0
for char in s:
if char not in vowels:
U/oDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAA8PDwAAAqoAAD4AvgC+AIAAAAAAAALARwaPDw8AAD6rAAA9Vj4AvqsBxz44gAADAEAHjw8PAAABVQAAPqs+AL2rQcc+OIAAAwBAB48PDwFVP1WAAD1WPgC+qz44gccAAAMARwaPDw8AAACqgAA9Vj4AvatBxwHHAAADAEcGgAAAAAAAAD9VgAAAAAAAAAAAAAAAAwBAAA8PB4AAAAAAAD4AvgC9VgAAAAAAAARAQAqPDweAAAAAAAA+AL4AvVYAAAAAAAAEgEmBhQeCgAAAAAAAP1W/AH1WAAAAAAAABIBAB48PB4AAAAAAAD4AvgC9VgAAAAAAAARAQAqAAAANUgAAAAA/VbpW/6r+OIAAAAADAEAAAAAAMq4AAAAAAP/6VwBVPjiAAAAAAwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM
// https://medium.com/@hxu0407/master-these-8-promise-concurrency-control-techniques-to-significantly-improve-performance-5a1c199b6b3c
// 1. Promise.all: Execute in Parallel and Return Results Together
const promise1 = Promise.resolve(1);
const promise2 = Promise.resolve(2);
const promise3 = Promise.resolve(3);
Promise.all([promise1, promise2, promise3])
.then(results => {
console.log(results); // Output: [1, 2, 3]
});
// 2. Promise.allSettled: Execute in Parallel and Retur
/**
* This function calculates the minimum number of operations needed
* to transform a 2D grid into a uniform grid based on a given step size.
* If it's not possible, it returns -1.
*
* @param {number[][]} grid - The input 2D grid of numbers.
* @param {number} x - The step size for allowed operations.
* @return {number} The minimum number of operations, or -1 if not possible.
*/
var minOperations = function(grid, x) {
// Flatten the 2D array into a 1D array and sort it in ascendin
Redirect domainA.com to domainB.com
# HTTP → HTTPS + Redirect to domainB.com
server {
listen 80;
server_name domainA.com www.domainA.com;
return 301 https://domainB.com$request_uri; # Force HTTPS first (optional)
}
# HTTPS → domainB.com
server {
listen 443 ssl;
server_name domainA.com www.domainA.com;
# SSL certificates (replace paths)
ssl_certificate /etc/letsencrypt/live/domainA.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domainA.com/privk
https://www.youtube.com/watch?v=3-icphihD6Y
chase the cheapest needle
stems from
fast fashion
outsourceced
social media, invisible pressure
cause and effect
guinea pig
received accent
highly regulated
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudformation:StartResourceScan",
"cloudformation:GetResourceScan",
"cloudformation:ListResourceScans",
"cloudformation:CreateGeneratedTemplate",
"cloudformation:GetGeneratedTemplate",
"cloudformation:ListGeneratedTemplates",
"cloudformation:UpdateGeneratedTemplate",
// https://medium.com/@hxu0407/9-smart-ways-to-replace-if-else-in-javascript-28f82ad6dcb9
// 1. Object Mapping Instead of if-else
function getPrice(user) {
if (user.type === 'vip') {
return 'VIP Price';
} else if (user.type === 'svip') {
return 'SVIP Price';
} else if (user.type === 'vvip') {
return 'VVIP Price';
} else {
return 'Regular Price';
}
}
// better
const priceStrategy = {
vip: () => 'VIP Price',
svip: () => 'SVIP Price',
vvip: () => 'VVIP Price',
de
// https://medium.com/@hxu0407/9-smart-ways-to-replace-if-else-in-javascript-28f82ad6dcb9
### Install Vercel
- `npm install vercel`
- Ensure you have vercel connected to a git account
- `vercel login`
- Create a directory:
```
mkdir vercel-api
cd vercel-api
npm init -y
npm install dotenv
```
- Create `vercel-api/api/function_name.js` - this is where the serverless function will live
- Ensure the following structure:
```
/my-vercel-api
|--- api
| |--- name_of_function.js
|--- package.json
|--- .env
|--- vercel.json
```
- Sample of handler function code:
```js
import 'dotenv/conf
class SlideshowComponent extends SliderComponent {
constructor() {
super();
if (this.dataset.swipe === 'true') {
this.swipeStartX = null;
this.swipeStartY = null;
this.swipeThreshold = 30;
this.addEventListener('mousedown', this.handleSwipeStart.bind(this));
this.addEventListener('mouseup', this.handleSwipeEnd.bind(this));
this.addEventListener('mousemove', this.handleSwipeMove.bind(this));
}
}
handleSwipeStart(event) {