Profile | download (kb/s) | upload (kb/s) | latency (ms) |
---|---|---|---|
Native | 0 | 0 | 0 |
GPRS | 50 | 20 | 500 |
56K Dial-up | 50 | 30 | 120 |
Mobile EDGE | 240 | 200 | 840 |
2G Regular | 250 | 50 | 300 |
2G Good | 450 | 150 | 150 |
3G Slow | 780 | 330 | 200 |
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
/** | |
* # `<Image>` | |
* | |
* This component is a merge between `next/image` and `Chakra-ui`. | |
* - last updated on 2023-08-08 with `next/image` 13.4.13 and `chakra-ui/react` 2.8.0 | |
* - https://github.com/vercel/next.js/blob/v13.4.13/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/blob/canary/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/commits/canary/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/compare/v13.4.4...canary | |
* |
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
// In main App or Layout component add following: | |
const isMobile = useMediaQuery({ maxWidth: 767 }); // From react-responsive, Material UI or other styling library | |
useEffect(() => { | |
// Due to SSR/SSG we can not set 'app-layout onMobile' or 'app-layout onDesktop' on the server | |
// If we modify className using JS, we will got Warning: Prop `className` did not match. Server: "app-layout" Client: "app-layout onDesktop" | |
// So we have to apply document.body.class using the hook :) | |
if (isMobile) { | |
document.body.classList.remove('onDesktop'); |
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
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
import React from "react"; | |
import axios from "axios"; | |
const sitemapXml = data => { | |
let latestPost = 0; | |
let projectsXML = ""; | |
data.map(post => { | |
const postDate = Date.parse(post.modified); | |
if (!latestPost || postDate > latestPost) { |
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
@import '~bootstrap/scss/bootstrap.scss'; |
With VSCode version 1.94, the APC extension broke and there is no fix yet.
So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:
"update.mode": "manual",
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
import {Pipe, PipeTransform} from '@angular/core'; | |
@Pipe({ | |
name: 'dateAgo', | |
pure: true | |
}) | |
export class DateAgoPipe implements PipeTransform { | |
transform(value: any, args?: any): any { | |
if (value) { |
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
// file from wp-content/plugins/advanced-gutenberg/assets/js/ | |
jQuery(document).ready(function ($) { | |
$('.wp-block-gallery').each(function () { | |
// Add lightbox for images | |
$(this).find('.blocks-gallery-item').colorbox({ | |
title: function () { | |
if (parseInt(advgb.imageCaption)) { | |
var imgCap = $(this).find('figcaption').text() || $(this).find('img').attr('alt'); | |
return imgCap; |
NewerOlder