Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / what-forces-layout.md
Last active July 27, 2024 18:06
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
Как разместить html5 баннер на сайт:
Прописываем путь src в (между) тегом iframe.
<iframe src="http://www.site.com/banner_html5.html" width="579" height="260" frameborder="0"></iframe>
========================================================================================================
Пример 2
========================================================================================================
<div id="ad" style="width:100%;height:90px;">
@the-spyke
the-spyke / pipewire.md
Last active July 27, 2024 18:04
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active July 27, 2024 18:03
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 27, 2024 18:00
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@rxaviers
rxaviers / gist:7360908
Last active July 27, 2024 17:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@lostrouter
lostrouter / android-terminal-shortcuts.md
Created April 20, 2020 22:30
How to create terminal shortcuts to launch android emulator without opening android studio

How to create terminal shortcuts to launch Android Emulator without opening android studio

Windows

In your bash terminal

code ~/.bashrc
@nikitasinelnikov
nikitasinelnikov / functions.php
Created January 5, 2024 13:36
Ultimate Member: Change the WP_Post object (title, content, excerpt) for displaying the restricted post. Ignore or use your custom
// It works since the 2.2.3:
// Avoid changing the post title to the "restricted content title".
add_filter( 'um_ignore_restricted_title', '__return_true' );
// Avoid changing the post content to the "restricted content content" not recommended to use or use with caution!
add_filter( 'um_ignore_restricted_content', '__return_true' );
// Avoid flushing the post excerpt when post is restricted.
add_filter( 'um_ignore_restricted_excerpt', '__return_true' );
// It works since the 2.8.2:
/**
# -*- coding: utf-8 -*-
"""
:description: A Function To Generate TOTP From Qrcode Image.
:license: MIT.
:author: Shabbir Hasan
:created: On Wednesday November 18 2022 17:43:57 GMT+05:30
"""
__author__ = "Shabbir Hasan"
__webpage__ = "https://github.com/ShabbirHasan1"
__license__ = "MIT"