You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Meg Claypool
megclaypool
Ex math teacher, now working as a web developer :)
[How to change the name a Mac app displays in the menu bar] [Answer from AskDifferent](https://apple.stackexchange.com/a/385074/225185) I use this to rename "Firefox Developer Edition" to "FF Dev" so my menu bar doesn't overflow!
Renaming the .app package in Finder only changes the name there, it doesn't change the name shown in the menu. To do so edit YOUR.app/Contents/Resources/XY.lproj/InfoPlist.strings (with XY being the language you are using) and change CFBundleName there.
For applications without localization files you can also edit YOUR.app/Contents/Info.plist and set a new value for CFBundleName there.
Managing CSS and JavaScript files in Drupal 8 with Libraries
Thought byDavid Hernandez
March 14, 2016
Drupal 8 CSS and JavaScript
Drupal 8 revolutionizes the theming experience with many significant improvements to make theming easier, and give themers the flexibility and control they've never had before. One of those major improvements is to the library management system, which controls the attaching of CSS and JavaScript files.
In this post we will cover how to create and control libraries from a theme. This will include SMACSS categorization for CSS files, dependencies, how to conditionally attach libraries, manipulating libraries that come from anywhere in a site (core, modules, or base themes,) and targeting individual files for removal or replacement. All this without needing a single line of PHP.
Creating Libraries
❗When you install qBittorrent, make sure to install NordVPN first. Then you want to make sure to limit qBittorrent so it will only use NordVPN’s connection (saving you from getting in trouble if you forget to turn on the VPN before torrenting).
Make sure NordVPN is disconnected
In Terminal, type ifconfig
Connect NordVPN
In Terminal, type ifconfig again
Find the connection that’s been added (in my case, it was utun4)
In qBittorrent, open the preferences and click on Advanced
Set the Network Interface to your NordVPN connection and click OK.
Test it by heading over to the Ubuntu alternative downloads page (these files are totally legal to download, so if something goes wrong you won’t get in trouble)
Pick a few versions of Ubuntu to download, and load the (old fashioned non-magnet 😛 ) torrent files into qBittorrent
This will show the name you need to supply to VSCode to use the font.
Any font that is activated on the Mac will be available to VSCode. I am using a patched font, and by applying the name that is shown using the command above, I was able to use it in VSCode.
[Load code into head of Drupal site] On NIJC the client wanted to load a hotjar script into the head of the document (which then calls another script and attaches it to the head). However, they only wanted the script to load on certain pages. Here's
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
[Fix for Prettier Error: Unexpected doc.type 'concat']
As of 10-30-2023, the Prettier Melody plugin that allows Prettier to work on .twig files hasn't been updated in ages. Meanwhile, Prettier has been updated to 3.0, which (it turns out) was a breaking change as far as the Twig Melody plugin is concerned.
[Add a submenu toggle button to WordPress menu items with children] Here are the PHP code and JS that will let you create a toggle and cause it to actually toggle classes and aria-expanded attributes. Use styles to show and hide the submenu, and to
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
These are set up as Twig functions in a module in the NIJC site. This might be pretty sweet to import as a Radicati Drupal module?
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