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 \ | |
| --verbose \ | |
| --request OPTIONS \ | |
| http://localhost:3001/api/configuration/visitor \ | |
| --header 'Origin: http://localhost:9292' \ | |
| --header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \ | |
| --header 'Access-Control-Request-Method: GET' | |
| # http://nils-blum-oeste.net/cors-api-with-oauth2-authentication-using-rails-and-angularjs/#.UQJeLkp4ZyE |
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/php | |
| <?php | |
| if (! isset($argv[1])) { | |
| fputs(STDERR, "Please provide a URL to crawl\n"); | |
| die(1); | |
| } | |
| if (! isset($argv[2])) { | |
| fputs(STDERR, "Please provide an output filename\n"); |
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
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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 | |
| class ColorCLI { | |
| static $foreground_colors = array( | |
| 'bold' => '1', 'dim' => '2', | |
| 'black' => '0;30', 'dark_gray' => '1;30', | |
| 'blue' => '0;34', 'light_blue' => '1;34', | |
| 'green' => '0;32', 'light_green' => '1;32', | |
| 'cyan' => '0;36', 'light_cyan' => '1;36', |
NewerOlder