git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| <?php | |
| /** | |
| * @package Food_example_plugin | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: Food example plugin | |
| Plugin URI: http://wordpress.org/extend/plugins/# | |
| Description: This is an example plugin for WPMU DEV readers | |
| Author: Carlo Daniele |
| OPENWEATHER_APIKEY = "" # TODO add your apikey here | |
| lat = "49.868183" # latitude of the city you want to get the weather from | |
| lon = "8.626288499" # longitude of the city you want to get the weather from | |
| def getWeatherEmoji(weatherID) | |
| # Openweathermap Weather codes and corressponding emojis | |
| thunderstorm = "\u{1F4A8}" # Code: 200's, 900, 901, 902, 905 | |
| drizzle = "\u{1F4A7}" # Code: 300's | |
| rain = "\u{02614}" # Code: 500's |
| sudo apt-get install libgnome-keyring-dev | |
| cd /usr/share/doc/git/contrib/credential/gnome-keyring | |
| sudo make | |
| sudo ln -s /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring /usr/lib/git-core/ |
| <?php //<~ Remove me | |
| //Removes Title and Description on CPT Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
| //Removes Title and Description on Blog Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
| //Removes Title and Description on Date Archive | |
| remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
| //Removes Title and Description on Archive, Taxonomy, Category, Tag | |
| remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| <?php | |
| /** | |
| * Use namespace to avoid conflict | |
| */ | |
| namespace PostType; | |
| /** | |
| * Class Event | |
| * @package PostType | |
| * |
| #!/bin/bash | |
| mkdir wordpress-site && cd wordpress-site | |
| touch docker-compose.yml | |
| cat > docker-compose.yml <<EOL | |
| version: "2" | |
| services: | |
| my-wpdb: |
| # Install brew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install composer | |
| brew install homebrew/php/composer | |
| ### PHPCS | |
| composer global require "squizlabs/php_codesniffer=*" | |
| # Add to your .bash_profile |
SessionsHelper
store_location (usage)redirect_back_or (usage)