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
| // It matches anything in range 0-31, 127-255 and removes it. | |
| $string = preg_replace('/[\x00-\x1F\x7F-\xFF]/', '', $string); |
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
| curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{ | |
| "password" : "123456" | |
| } |
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 | |
| set_time_limit(0); | |
| $curl = curl_init(); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE"); | |
| curl_setopt($curl, CURLOPT_URL, ""); | |
| $response = curl_exec($curl); | |
| echo $response, PHP_EOL; |
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 | |
| set_time_limit(0); | |
| $curl = curl_init(); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE"); | |
| curl_setopt($curl, CURLOPT_URL, ""); | |
| $response = curl_exec($curl); | |
| echo $response, PHP_EOL; |
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 | |
| $data = ['中文']; | |
| echo json_encode($data, JSON_UNESCAPED_UNICODE), PHP_EOL; |
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
| nvm install stable --reinstall-packages-from=${OLD_VERSION} | |
| e.g. nvm install stable --reinstall-packages-from=6.10.0 |