Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
function loadFixtures<Contents = unknown>(remainingPaths: string[], loadedContents: Contents[]): Chainable<Contents[]> { | |
return cy.fixture<Contents>(remainingPaths[0]).then((contents) => { | |
loadedContents.push(contents); | |
if (remainingPaths.length > 1) { | |
return loadFixtures(remainingPaths.slice(1), loadedContents); | |
} | |
return cy.wrap(loadedContents); | |
}); | |
} |
#!/bin/zsh | |
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3 | |
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12) | |
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery) | |
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist | |
# user | |
TODISABLE=() |
Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.
Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27
If you have any linux machine, use that or install a vm if you don't have one.
Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx
[Unit] | |
Description=Remove unused docker resources | |
Documentation=https://docs.docker.com/v17.09/engine/admin/pruning/ | |
After=docker.service | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/docker system prune -f --filter "until=744h" | |
ExecStart=/usr/bin/docker volume prune -f |
This is a simple sample script for achieving the resumable upload to Google Drive using Python. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL.
In this sample, a PNG file is uploaded with the resumable upload using a single chunk.
Before you use this, please set the variables.
Apple MacBook Pro M1, 32 GB, Ventura 13.2
Documentation based on comments in this Github Elasticsearch issue.
// To compile this program, you need to install: | |
// sudo apt-get install libbluetooth-dev | |
// Then you can compile it with: | |
// cc scanner.c -lbluetooth -o scanner | |
// You can then run it with: | |
// ./scanner | |
// Copyright (c) 2021 David G. Young | |
// Copyright (c) 2015 Damian Kołakowski. All rights reserved. | |
// License: BSD 3. See: https://github.com/davidgyoung/ble-scanner |
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent