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
| # https://gist.github.com/rmpel/a54ffc349ecdba57c5dd7f33b81263dd | |
| # | |
| # This file is for unifying the coding style for different editors and IDEs | |
| # Or at least; that is the plan. Currently FULLY supported IDEs are: | |
| # - phpStorm | |
| # | |
| # Tried and failed; | |
| # - VS Code (Supports .editorConfig, but does not support any extended rule-set) | |
| # | |
| # More information on the file format: |
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
| #!/usr/bin/env bash | |
| ######### | |
| ## Configuration: | |
| ## Set your primary and secondary development paths. | |
| ## YOU CANNOT HAVE SPACES IN THE PRIMARY PATH - If you have, then most tooling here will fail because of limitations in macOS Terminal. | |
| ## AND NO - This tool is not built to use a different terminal. | |
| ## | |
| PRIMARY_LOCATION=~/Development | |
| SECONDARY_LOCATION=/Volumes/Macintosh\ SD/Development |
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 is a zsh script to automatically switch to the localwp shell when you enter a | |
| # directory that contains a LocalWP website installation | |
| # it is designed to trigger on any directory deeper or exactly the app/ folder of a localwp site. | |
| # this code is FAR FROM perfect, but it works! Feel free to suggest/improve/etc | |
| # | |
| # this file is to be sourced in your .zshrc . | |
| # | |
| # Suggested install method: | |
| # cd ~ ; mkdir -p .zsh ; git clone https://gist.github.com/f5c220b5e49baf0df4f5bbf5b7e76fdf.git .zsh/zsh-auto-localwp | |
| # echo "source ~/.zsh/zsh-auto-localwp/zsh-auto-localwp.sh" >> ~/.zshrc |
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 | |
| // usage: php downgrade-kicad-to-v9.php -in path/to/schematic/or/pcb/file -out path/to/schematic/or/pcb/file/new-version | |
| // This is in a "Works on nmy machine" state | |
| // Use at own risk | |
| $in = 'php://stdin'; | |
| $out = 'php://stdout'; | |
| $dryRun = false; |
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
| #!/usr/bin/env php | |
| <?php | |
| function acf_add_local_field_group($data) { | |
| foreach ( $data as $array_key => $array_value ) { | |
| if ( is_array($array_value) ) { | |
| acf_add_local_field_group( $array_value ); | |
| } | |
| else { | |
| if ( 'key' === $array_key && false === strpos( $array_value, 'layout_' ) ) { |
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 | |
| /** | |
| * Filters that assist in uploading additional filetypes. | |
| * | |
| * @package Your_Package | |
| * @subpackage Your_Package/Includes | |
| */ | |
| namespace Your_Package\Includes; |
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
| # BEGIN WP Security | |
| <IfModule mod_headers.c> | |
| #set header for all | |
| Header set Content-Security-Policy "default-src 'self' *.googlesyndication.com vimeo.com *.vimeo.com *.vimeocdn.com *.amazonaws.com *.google-analytics.com *.yoast.com yoast.com *.diffuse.tools; connect-src 'self' *.googlesyndication.com google.com *.google.com vimeo.com *.vimeo.com *.linkedin.com *.vimeocdn.com *.amazonaws.com *.google-analytics.com *.yoast.com yoast.com *.diffuse.tools; frame-src 'self' vimeo.com *.vimeo.com *.vimeocdn.com youtube.com *.youtube.com *.googletagmanager.com *.youtube-nocookie.com *.google.com *.doubleclick.net; script-src 'unsafe-inline' 'unsafe-eval' 'self' *.yoast.com yoast.com *.gstatic.com google.com *.google.com googletagmanager.com *.googletagmanager.com *.googleapis.com google-analytics.com *.google-analytics.com *.googlesyndication.com code.diffuse.nl adservice.google.nl adservice.google.com *.googleadservices.com browser-update.org *.facebook.net snap.licdn.com *.doubleclick.net; style-src 'unsafe |
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
| #!/usr/bin/env bash | |
| # usage; cron entry to run this script every minute. | |
| # the script will take 3 snaps at most, at run, run+20, run+40. Next minute is a new iteration. | |
| # script construction allows changes between snaps, as the script runs itself 3x. | |
| cd "$(dirname "$0")" | |
| # Set default values for environment variables | |
| : "${HTTP_URL:=https://webcam.connect.prusa3d.com/c/snapshot}" | |
| : "${DELAY_SECONDS:=20}" |
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 | |
| add_filter( 'password_needs_rehash', 'mu_plugin_mdms_prevent_password_rehashing', 11, 3 ); | |
| /** | |
| * Maybe prevent password rehashing, limit rehashing to a set-up time-slot. | |
| * This filter is only effective in WordPress 6.8 and up, and when not overriding the $wp_hasher global variable. | |
| * This is to prevent the password rehashing from happening too often, which WILL cause users forced being logged in every time they switch to a different domain subsite. | |
| * | |
| * @param bool $needs_rehash Whether the password needs rehashing, defaults to true. | |
| * While this could also be false; the way WordPress is set-up, |
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
| #!/usr/bin/env bash | |
| # https://gist.github.com/rmpel/969508c652de6a9bf33e4ac0f89996a4 | |
| cd "$(dirname "$0")" || exit 1 | |
| SCRIPTDIR="$(pwd)" | |
| SCRIPTFILE="$(basename "$0")" | |
| SCRIPTPATH="$(realpath "$SCRIPTDIR"/"$SCRIPTFILE")" |
NewerOlder