Add the JS snippet to your global js footer reveal effect (the "footer.fl-builder-content" target is specific to a beaver builder footer, but can be modified as needed).
Discover gists
This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root
element.
There are a couple of main reasons this is helpful:
- You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
- You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.
See the Tailwind Plugins for more info on plugins.
See also: UIApplicationDelegate
documentation
// AppDelegate.swift
@UIApplicationMain
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
Header will need to be set to sticky and overlay by default.
Simply add this script to your global JS or enque as a seperate script file.
/** | |
* Find all Vue components that match the given matcher and return them in an array. | |
* @param parent The parent component to search. | |
* @param matcher The matcher to use. | |
* @returns An array of components that match the given matcher. | |
*/ | |
export const findVueChildComponents = (parent: any, matcher: RegExp | String | undefined) => { | |
const found: any[] = []; | |
const root = parent.$.subTree; |
const push = async (file, fileName) => { | |
const client = new aws.SecretsManager(); | |
const spURL = `https://<your site>.sharepoint.com/sites/<your specific subsite>/_api/web/GetFolderByServerRelativeUrl('Documents')/Files/Add(url='${fileName}', overwrite=true)`; | |
try { | |
const data = await client.getSecretValue({ SecretId: '<whatever you called your secret>' }).promise(); | |
const secret = JSON.parse(data.SecretString).<whatever you called your secret>; | |
const getToken = await axios.post('https://accounts.accesscontrol.windows.net/<sharepoint resource id>/tokens/OAuth/2', | |
querystring.stringify({ | |
grant_type: 'client_credentials', | |
client_id: '<ask your sharepoint person for this it's a something@tenant id>', |
- I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
- I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
- Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.
- On WG server, I started an
iperf3
server - On WG peer, I wrote a script that does the following:
wg-quick down wg0
- Edit MTU in the
/etc/wireguard/wg0.conf
file
# import nothing | |
""" | |
Tested in cpython 3.6, 3.8 (from the arch repos) on 64-bit arch linux | |
""" | |
nullfunc = lambda: None | |
#from types import CodeType, FunctionType | |
CodeType = nullfunc.__code__.__class__ | |
FunctionType = nullfunc.__class__ |
In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.
In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:
low
: the cheapestmedium
: moderate