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
While developing/testing projects in different PHP versions, I got overwhelmed by running Xdebug for every PHP version. I just want everything to be set and switch php versions and use Xdebug right away! | |
I use PHP 7.4, 8.0, 8.1, 8.2, 8.3 in Mac environment. | |
I use Herd to run PHP. | |
Steps to install Xdebug for every version | |
For 7.4 | |
Install php@7.4 using brew | |
Install pecl | |
pecl install xdebug-3.1.6 | |
Move the xdebug.so file to somewhere else ($HOME/xdebug/3.1.6) | |
Add this absolute path to php.ini |
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
Show hidden characters
{ | |
"shell_cmd": "g++ -std=c++17 ${file} && ./a.out<input.txt>output.txt" | |
} |
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
#include <bits/stdc++.h> | |
#define nl "\n" | |
#define ll long long | |
#define ull unsigned long long | |
#define all(v) v.begin(),v.end() | |
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) | |
#define watch(x) cerr << "\n" << (#x) << " is " << (x) << nl; | |
#define iterate(i, n) for(int i = 0; i < n; i++) | |
#define print_printable_vector_inline(v) for(auto i:v) {cout << i << " ";}; cout << nl; |
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
// Wordpress query generator -> | |
// https://GenerateWP.com/wp_query/ | |
$args = array( | |
'post_type' => array('post'), // use any for any kind of post type, custom post type slug for custom post type | |
'post_status' => array('publish'), // Also support: pending, draft, auto-draft, future, private, inherit, trash, any | |
'posts_per_page' => '5', // use -1 for all post | |
'order' => 'DESC', // Also support: ASC | |
'orderby' => 'date', // Also support: none, rand, id, title, slug, modified, parent, menu_order, comment_count | |
'tax_query' => array( |