Best Practice, Blogs, Guides, Lists, Web Design Inspiration & Front-end Development Tools
Discover gists
This file contains hidden or 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
| # AGENTS.md | |
| - Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations. | |
| - Choose the simplest implementation that fully meets the current requirements. Avoid speculative abstractions, configuration, and indirection. | |
| - Grow the system in layers. Start from the smallest version that works end to end, and add each new capability on top of a product that already works. Never trade a working product for unfinished complexity. | |
| - Keep components modular and concerns clearly separated. | |
| - Prefer established, well-maintained libraries when they reduce overall complexity or improve reliability. Do not reimplement common functionality without a clear reason. | |
| - Lean on the dependencies already in the project before writing your own implementation or adding packages. Do not assume a library lacks a capability without checking its documentation and types. | |
| - Make architectural decisions for the long term. Do not accept a stopgap that only works for now an |
This file contains hidden or 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
| /** | |
| * Add GTIN Field to WooCommerce Quick Edit Panel | |
| * | |
| * Allows viewing and editing GTIN from the Quick Edit dropdown. | |
| */ | |
| /** | |
| * Get the GTIN field label (same as product settings). | |
| * | |
| * @return string |
This file contains hidden or 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
| [ | |
| { | |
| "name": "Afghanistan", | |
| "dial_code": "+93", | |
| "code": "AF" | |
| }, | |
| { | |
| "name": "Aland Islands", | |
| "dial_code": "+358", | |
| "code": "AX" |
This file contains hidden or 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
| <?php | |
| # Register custom post types on the 'init' hook. | |
| add_action( 'init', 'my_register_post_types' ); | |
| /** | |
| * Registers post types needed by the plugin. | |
| * | |
| * @since 1.0.0 | |
| * @access public |
This file contains hidden or 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
| mkfifo /tmp/gfifo | |
| ./xdp-screen-cast-ffmpeg.py & # or run in another terminal | |
| # Note the gstreamer pipeline | |
| # 'pipewiresrc fd=%d path=%u ! videorate ! video/x-raw,framerate=60/1 ! videoconvert ! filesink location=/tmp/gfifo' | |
| # I specified a 60/1 frameerate. You can do other pre-processing here, or offload it to ffmpeg. | |
| # Encode the stream and pipe to netcat | |
| # note: must specify correct resolution here | |
| # we can now use h264_nvenc, mpegts, and anything else ffmpeg has |
This file contains hidden or 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
| ## Setup | |
| MacBookPro, M1 Pro w/ 32GB RAM, Sequoia 15.0.1 | |
| Ruby 3.3.5 | |
| Sidekiq 7.3.5 | |
| Solid Queue 1.0.2 | |
| Rails 8.0.0 | |
| ## Results |
Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)
Due to what appears to be dependency issues, the gamescope package isn't avalible for Ubuntu 24.04. So here's a guide on how to build and install gamescope for Ubuntu 24.04
- Pull latest git of gamescope
$ git clone https://github.com/ValveSoftware/gamescope.git
- Install needed dependencies to build
gamescope
`$ sudo apt install libbenchmark1.8.3 libdisplay-info1 libevdev-dev libgav1-1 libgudev-1.0-dev libmtdev-dev libseat1 libstb0 libwacom-dev libxcb-ewmh2 libxcb-shape0-dev libxcb-xfixes0-dev libxmu-headers libyuv0 libx11-xcb-dev libxres-dev libxmu-dev libseat-dev libinput-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-res0-dev libcap-dev
This file contains hidden or 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
| if((Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters\' -Name 'KeepAliveTime'-EA SilentlyContinue) -Eq $Null){Write-Verbose "Adding Registry Value" -Verbose;New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters\' -Name 'KeepAliveTime' -PropertyType 'DWord' -Value 1800000} | |
| if((Get-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\RPC\' -Name 'MinimumConnectionTimeout'-EA SilentlyContinue) -Eq $Null){Write-Verbose "Adding Registry Value" -Verbose;New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\RPC\' -Name 'MinimumConnectionTimeout' -PropertyType 'DWord' -Value 120} |