-
When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!
-
Always use fewer utility classes when possible. For example, use
mx-2instead ofml-2 mr-2and don't be afraid to use the simplerp-4 lg:pt-8instead of the longer, more complicatedpt-4 lg:pt-8 pr-4 pb-4 pl-4. -
Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use
block lg:flex lg:flex-col lg:justify-centerinstead ofblock lg:flex flex-col justify-centerto make it very clear that the flexbox utilities are only applicable at the
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
| #!/bin/bash | |
| youtube_url="$1" | |
| echo "Downloading video..." | |
| video_info=$(yt-dlp -e -o "%(title)s" -- "$youtube_url") | |
| sanitized_title=$(echo "$video_info" | sed 's/[^a-zA-Z0-9_.-]/_/g') | |
| output_file="${sanitized_title}.mp4" | |
| yt-dlp -o "temp.mp4" -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -- "$youtube_url" |
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
| .force-show-scrollbars ::-webkit-scrollbar-track:vertical { | |
| border-left: 1px solid #E7E7E7; | |
| box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset; | |
| } | |
| .force-show-scrollbars ::-webkit-scrollbar-track:horizontal { | |
| border-top: 1px solid #E7E7E7; | |
| box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset; | |
| } |
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
| # | |
| # REQUIRES: | |
| # - server (the forge server instance) | |
| # - event (the forge event instance) | |
| # - sudo_password (random password for sudo) | |
| # - db_password (random password for database user) | |
| # - callback (the callback URL) | |
| # |
If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
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
| // This list comes from Wikipedia deprecated timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
| const deprecatedList = [ | |
| { old: 'Australia/ACT', new: 'Australia/Sydney' }, | |
| { old: 'Australia/LHI', new: 'Australia/Lord_Howe' }, | |
| { old: 'Australia/North', new: 'Australia/Darwin' }, | |
| { old: 'Australia/NSW', new: 'Australia/Sydney' }, | |
| { old: 'Australia/Queensland', new: 'Australia/Brisbane' }, | |
| { old: 'Australia/South', new: 'Australia/Adelaide' }, | |
| { old: 'Australia/Tasmania', new: 'Australia/Hobart' }, | |
| { old: 'Australia/Victoria', new: 'Australia/Melbourne' }, |
This gist will no longer be updated as the changelog will be on the official website.
- Sublime Text/Merge Official Discord chat server: https://discord.gg/D43Pecu
- Sublime Text/Merge 中文 Telegram 交流群組: https://t.me/sublime_tw
Converted via https://domchristie.github.io/turndown
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
| # Replace! | |
| # [!server!] (the forge server instance) | |
| # [!sudo_password!] (random password for sudo) | |
| # [!db_password!] (random password for database user) | |
| # [!user.name!] (git user name) | |
| # [!user.email!] (git user email) | |
| # [!server_ip!] (git user email) | |
| # | |
| # REQUIRES: |
Here are the steps needed to run a self hosted Open Street Map server (using Docker):
-
Download desired
pbffiles (likesouth-carolina-latest.osm.pbf) from https://download.geofabrik.de or just use the following empty planet below:<?xml version='1.0' encoding='UTF-8'?> <osm version="0.6" generator="osmconvert 0.8.8" timestamp="2019-10-23T20:18:02Z"> <bounds minlat="42.4276" minlon="1.412368" maxlat="42.65717" maxlon="1.787481"/> </osm>
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
| // This code allows you to render a page as Googlebot with puppeter (headless Chrome). | |
| // It even renders elements with the lazy-load implemented through IntersectionObserver. | |
| // Copy and paste it here: https://try-puppeteer.appspot.com/ | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| // Descriptors for other mobile devices: https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | |
| const mobile = { | |
| name: 'Nexus 5X', |
